Unverified Commit f86b10a6 by Melvin Klimke Committed by GitHub

Include internal thunk functions (#105)

parent 02b9ec8a
...@@ -103,7 +103,7 @@ public class PcodeExtractor extends GhidraScript { ...@@ -103,7 +103,7 @@ public class PcodeExtractor extends GhidraScript {
*/ */
protected void setFunctionEntryPoints() { protected void setFunctionEntryPoints() {
// Add internal function addresses // Add internal function addresses
for(Function func : funcMan.getFunctionsNoStubs(true)) { for(Function func : funcMan.getFunctions(true)) {
String address = func.getEntryPoint().toString(); String address = func.getEntryPoint().toString();
functionEntryPoints.put(address, new Tid(String.format("sub_%s", address), address)); functionEntryPoints.put(address, new Tid(String.format("sub_%s", address), address));
} }
...@@ -139,9 +139,9 @@ public class PcodeExtractor extends GhidraScript { ...@@ -139,9 +139,9 @@ public class PcodeExtractor extends GhidraScript {
* Iterates over functions to create sub terms and calls the block iterator to add all block terms to each subroutine. * Iterates over functions to create sub terms and calls the block iterator to add all block terms to each subroutine.
*/ */
protected Term<Program> iterateFunctions(SimpleBlockModel simpleBM, Listing listing) { protected Term<Program> iterateFunctions(SimpleBlockModel simpleBM, Listing listing) {
FunctionIterator functions = funcMan.getFunctionsNoStubs(true); FunctionIterator functions = funcMan.getFunctions(true);
for (Function func : functions) { for (Function func : functions) {
if (!func.isThunk()) { if (!externalSymbolMap.containsKey(func.getName())){
Term<Sub> currentSub = createSubTerm(func); Term<Sub> currentSub = createSubTerm(func);
currentSub.getTerm().setBlocks(iterateBlocks(currentSub, simpleBM, listing)); currentSub.getTerm().setBlocks(iterateBlocks(currentSub, simpleBM, listing));
program.getTerm().addSub(currentSub); program.getTerm().addSub(currentSub);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment