Skip to content

Commit

Permalink
Namespace fix
Browse files Browse the repository at this point in the history
  • Loading branch information
robojumper committed Oct 6, 2024
1 parent 63f3335 commit 1be4d62
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions tools/ghidra_scripts/DecompMapToGhidra.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,12 @@ def update_addr(addr, mangled_name):
namespace = NamespaceUtils.createNamespaceHierarchy(namespace_str, None, currentProgram, IMPORTED)

sym = getSymbolAt(addr)
if namespace is None:
namespace = currentProgram.getGlobalNamespace()
if sym:
if namespace:
sym.setNameAndNamespace(symbol_str, namespace, IMPORTED)
else:
sym.setName(symbol_str, IMPORTED)
sym.setNameAndNamespace(symbol_str, namespace, IMPORTED)
else:
if namespace:
createLabel(addr, symbol_str, namespace, True, IMPORTED)
else:
createLabel(addr, symbol_str, True, IMPORTED)

createLabel(addr, symbol_str, namespace, True, IMPORTED)
unit.setComment(PLATE_COMMENT, new_comment)

def apply_symbols_map(symbols_map, file_name):
Expand Down

0 comments on commit 1be4d62

Please sign in to comment.