mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
GP-5764 added option to RecoverClassesFromRTTIScript enabling users to not force vfunctions to be thiscalls.
This commit is contained in:
parent
0bd8870da3
commit
cee04048cb
7 changed files with 30 additions and 18 deletions
|
@ -123,6 +123,9 @@ public class RecoverClassesFromRTTIScript extends GhidraScript {
|
|||
// bookmark all constructor/destructor functions recognized by script
|
||||
private static final boolean BOOKMARK_FOUND_FUNCTIONS = true;
|
||||
|
||||
// make vfunctions this calls
|
||||
private static final boolean MAKE_VFUNCTIONS_THISCALLS = true;
|
||||
|
||||
// show a graph of class hierarchies after script is complete
|
||||
// no parent = blue vertex
|
||||
// single parent = green vertex
|
||||
|
@ -193,7 +196,7 @@ public class RecoverClassesFromRTTIScript extends GhidraScript {
|
|||
nameVfunctions = !hasDebugSymbols;
|
||||
recoverClassesFromRTTI = new RTTIWindowsClassRecoverer(currentProgram, state.getTool(),
|
||||
this, BOOKMARK_FOUND_FUNCTIONS, USE_SHORT_TEMPLATE_NAMES_IN_STRUCTURE_FIELDS,
|
||||
nameVfunctions, hasDebugSymbols, monitor);
|
||||
nameVfunctions, MAKE_VFUNCTIONS_THISCALLS, hasDebugSymbols, monitor);
|
||||
}
|
||||
else if (isPE() && isGcc()) {
|
||||
|
||||
|
@ -214,7 +217,7 @@ public class RecoverClassesFromRTTIScript extends GhidraScript {
|
|||
|
||||
recoverClassesFromRTTI = new RTTIGccClassRecoverer(currentProgram, state.getTool(),
|
||||
this, BOOKMARK_FOUND_FUNCTIONS, USE_SHORT_TEMPLATE_NAMES_IN_STRUCTURE_FIELDS,
|
||||
nameVfunctions, hasDebugSymbols, monitor);
|
||||
nameVfunctions, MAKE_VFUNCTIONS_THISCALLS, hasDebugSymbols, monitor);
|
||||
}
|
||||
else if (isGcc()) {
|
||||
|
||||
|
@ -242,7 +245,7 @@ public class RecoverClassesFromRTTIScript extends GhidraScript {
|
|||
nameVfunctions = !hasDebugSymbols;
|
||||
recoverClassesFromRTTI = new RTTIGccClassRecoverer(currentProgram, state.getTool(),
|
||||
this, BOOKMARK_FOUND_FUNCTIONS, USE_SHORT_TEMPLATE_NAMES_IN_STRUCTURE_FIELDS,
|
||||
nameVfunctions, hasDebugSymbols, monitor);
|
||||
nameVfunctions, MAKE_VFUNCTIONS_THISCALLS, hasDebugSymbols, monitor);
|
||||
}
|
||||
else {
|
||||
println("This script will not work on this program type");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue