mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Merge remote-tracking branch 'origin/GP-6454_dev747368_gccexceptionanalyzer_taskmonitor_update'
This commit is contained in:
@@ -175,18 +175,15 @@ public class GccExceptionAnalyzer extends AbstractAnalyzer {
|
|||||||
List<RegionDescriptor> regions = ehframeSection.analyze(fdeTableCount);
|
List<RegionDescriptor> regions = ehframeSection.analyze(fdeTableCount);
|
||||||
|
|
||||||
AddressSet ehProtected = new AddressSet();
|
AddressSet ehProtected = new AddressSet();
|
||||||
|
monitor.initialize(getCallSiteRecordCount(regions), "Marking up Call Site records");
|
||||||
for (RegionDescriptor region : regions) {
|
for (RegionDescriptor region : regions) {
|
||||||
|
|
||||||
monitor.checkCancelled();
|
|
||||||
ehProtected.add(region.getRange());
|
ehProtected.add(region.getRange());
|
||||||
|
|
||||||
LSDACallSiteTable callSiteTable = region.getCallSiteTable();
|
LSDACallSiteTable callSiteTable = region.getCallSiteTable();
|
||||||
if (callSiteTable != null) {
|
if (callSiteTable != null) {
|
||||||
|
|
||||||
// Process this table's call site records.
|
// Process this table's call site records.
|
||||||
for (LSDACallSiteRecord cs : callSiteTable.getCallSiteRecords()) {
|
for (LSDACallSiteRecord cs : callSiteTable.getCallSiteRecords()) {
|
||||||
monitor.checkCancelled();
|
monitor.increment();
|
||||||
processCallSiteRecord(program, ehProtected, region, cs);
|
processCallSiteRecord(program, ehProtected, region, cs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -199,6 +196,17 @@ public class GccExceptionAnalyzer extends AbstractAnalyzer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getCallSiteRecordCount(List<RegionDescriptor> 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,
|
private void processCallSiteRecord(Program program, AddressSet ehProtected,
|
||||||
RegionDescriptor region, LSDACallSiteRecord cs) {
|
RegionDescriptor region, LSDACallSiteRecord cs) {
|
||||||
AddressRange callSite = cs.getCallSite();
|
AddressRange callSite = cs.getCallSite();
|
||||||
|
|||||||
Reference in New Issue
Block a user