Namespace fix

This commit is contained in:
robojumper
2024-10-06 19:13:17 +02:00
parent a391443bbb
commit ba90c20b27
+4 -9
View File
@@ -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):