isNameUsed added to DecompileCallback

This commit is contained in:
caheckman 2020-06-25 19:24:33 -04:00
parent 44ed318672
commit 05c3358fe4
9 changed files with 198 additions and 50 deletions

View file

@ -60,13 +60,11 @@ public class HighFunctionSymbol extends HighSymbol {
public Namespace getNamespace() {
Function func = function.getFunction();
Namespace namespc = func.getParentNamespace();
if (func.isThunk()) {
while (func.isThunk() && namespc.getID() == Namespace.GLOBAL_NAMESPACE_ID) {
// Thunks can be in a different namespace than the thunked function.
// We choose the thunk's namespace unless it is the global namespace
if (namespc.getID() == Namespace.GLOBAL_NAMESPACE_ID) {
Function baseFunc = func.getThunkedFunction(true);
namespc = baseFunc.getParentNamespace();
}
func = func.getThunkedFunction(false);
namespc = func.getParentNamespace();
}
return namespc;
}