Unverified Commit d3e87e55 by Melvin Klimke Committed by GitHub

Fix missing field tid bug (#163)

parent a6ef477d
...@@ -164,9 +164,9 @@ public final class HelperFunctions { ...@@ -164,9 +164,9 @@ public final class HelperFunctions {
* by some_function(). * by some_function().
* *
*/ */
public static Boolean notInReferences(Function func) { public static Boolean sameSymbolNameNotCallingCurrentSymbol(Function func) {
for(Function calling : func.getCallingFunctions(monitor)) { for(Function calling : func.getCallingFunctions(monitor)) {
if(calling.getName().equals(func.getName()) && calling.isThunk()) { if(calling.getName().equals(func.getName()) && calling.isThunk() && !calling.getEntryPoint().toString().equals(func.getEntryPoint().toString())) {
return false; return false;
} }
} }
......
...@@ -96,7 +96,7 @@ public class ExternSymbolCreator { ...@@ -96,7 +96,7 @@ public class ExternSymbolCreator {
ExternSymbol extSym = new ExternSymbol(); ExternSymbol extSym = new ExternSymbol();
extSym.setName(functions.getKey()); extSym.setName(functions.getKey());
for(Function func : functions.getValue()) { for(Function func : functions.getValue()) {
if(HelperFunctions.notInReferences(func)) { if(HelperFunctions.sameSymbolNameNotCallingCurrentSymbol(func)) {
extSym.setTid(new Tid(String.format("sub_%s", func.getEntryPoint().toString()), func.getEntryPoint().toString())); extSym.setTid(new Tid(String.format("sub_%s", func.getEntryPoint().toString()), func.getEntryPoint().toString()));
extSym.setNoReturn(func.hasNoReturn()); extSym.setNoReturn(func.hasNoReturn());
extSym.setArguments(createArguments(func)); extSym.setArguments(createArguments(func));
......
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