From f5bc8a800e0d87f7f57794da4ba5225b136c5797 Mon Sep 17 00:00:00 2001 From: dev747368 <48332326+dev747368@users.noreply.github.com> Date: Wed, 18 Feb 2026 00:26:17 +0000 Subject: [PATCH] GP-6454 more TaskMonitor'ing during GccExceptionAnalyzer --- .../gcc/GccExceptionAnalyzer.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/exceptionhandlers/gcc/GccExceptionAnalyzer.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/exceptionhandlers/gcc/GccExceptionAnalyzer.java index 51658f0ce5..fabac226e0 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/exceptionhandlers/gcc/GccExceptionAnalyzer.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/exceptionhandlers/gcc/GccExceptionAnalyzer.java @@ -175,18 +175,15 @@ public class GccExceptionAnalyzer extends AbstractAnalyzer { List regions = ehframeSection.analyze(fdeTableCount); AddressSet ehProtected = new AddressSet(); - + monitor.initialize(getCallSiteRecordCount(regions), "Marking up Call Site records"); for (RegionDescriptor region : regions) { - - monitor.checkCancelled(); ehProtected.add(region.getRange()); LSDACallSiteTable callSiteTable = region.getCallSiteTable(); if (callSiteTable != null) { - // Process this table's call site records. for (LSDACallSiteRecord cs : callSiteTable.getCallSiteRecords()) { - monitor.checkCancelled(); + monitor.increment(); processCallSiteRecord(program, ehProtected, region, cs); } } @@ -199,6 +196,17 @@ public class GccExceptionAnalyzer extends AbstractAnalyzer { } } + private int getCallSiteRecordCount(List regions) { + int total = 0; + for (RegionDescriptor region : regions) { + LSDACallSiteTable callSiteTable = region.getCallSiteTable(); + if (callSiteTable != null) { + total += callSiteTable.getCallSiteRecords().size(); + } + } + return total; + } + private void processCallSiteRecord(Program program, AddressSet ehProtected, RegionDescriptor region, LSDACallSiteRecord cs) { AddressRange callSite = cs.getCallSite();