Skip to content

Commit

Permalink
GP-3464 Improved gcc rtti script class struct recovery to better use …
Browse files Browse the repository at this point in the history
…dwarf info, split out parent struct in class struct, fix align issue keeping data from being created correctly, better id and name vftables in multi-inheritance case, clean up of exceptions, start of improved modeling vftables.
  • Loading branch information
ghidra007 committed Aug 29, 2023
1 parent a820a36 commit 5709ca8
Show file tree
Hide file tree
Showing 5 changed files with 424 additions and 303 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,28 +150,27 @@ public void retrieveExistingClassStructures(List<RecoveredClass> recoveredClasse
RecoveredClass recoveredClass = recoveredClassIterator.next();

// if class is non-virtual have to search for an existing class datatype
if (!recoveredClass.hasVftable()) {
DataType[] possibleExistingClassStructures =
extendedFlatAPI.getDataTypes(recoveredClass.getName());
if (possibleExistingClassStructures.length == 0) {

DataType[] possibleExistingClassStructures =
extendedFlatAPI.getDataTypes(recoveredClass.getName());
if (possibleExistingClassStructures.length == 0) {
continue;
}
for (int i = 0; i < possibleExistingClassStructures.length; i++) {
monitor.checkCancelled();
if (!(possibleExistingClassStructures[i] instanceof Structure)) {
continue;
}
for (int i = 0; i < possibleExistingClassStructures.length; i++) {
monitor.checkCancelled();
if (!(possibleExistingClassStructures[i] instanceof Structure)) {
continue;
}
if (possibleExistingClassStructures[i].isNotYetDefined()) {
continue;
}

Structure existingClassStructure =
(Structure) possibleExistingClassStructures[i];

recoveredClass.addExistingClassStructure(existingClassStructure);
break;
if (possibleExistingClassStructures[i].isNotYetDefined()) {
continue;
}

Structure existingClassStructure = (Structure) possibleExistingClassStructures[i];

recoveredClass.addExistingClassStructure(existingClassStructure);
break;
}

//Iterate over constructor/destructor functions
List<Function> constructorOrDestructorFunctions =
recoveredClass.getConstructorOrDestructorFunctions();
Expand Down

0 comments on commit 5709ca8

Please sign in to comment.