Synced from pmdsky-debug

This commit is contained in:
AnonymousRandomPerson
2024-12-28 00:42:34 -06:00
parent 3f53ea0f72
commit 607f3741a5
18 changed files with 66 additions and 61 deletions

View File

@@ -72,7 +72,7 @@ def read_xmap_symbols_for_language(language: str) -> Dict[str, Dict[int, SymbolD
if current_section is not None and current_section not in xmap_symbols:
xmap_symbols[current_section] = {}
elif current_section is not None and line.startswith(' ') and ('.text' in line or '.data' in line or '.bss' in line or '.itcm' in line) and len(line) > 28 and line[28] not in NON_FUNCTION_SYMBOLS:
elif current_section is not None and line.startswith(' ') and ('.text' in line or '.rodata' in line or '.data' in line or '.bss' in line or '.itcm' in line) and len(line) > 28 and line[28] not in NON_FUNCTION_SYMBOLS:
symbol_split = line[28:-1].split('\t')
symbol_name = symbol_split[0]
symbol_address = int(line[2:10], 16)
@@ -80,7 +80,7 @@ def read_xmap_symbols_for_language(language: str) -> Dict[str, Dict[int, SymbolD
if not symbol_name.startswith('$'):
xmap_symbols[current_section][symbol_address] = SymbolDetails(symbol_name, symbol_split[1][1:-1], True)
else:
xmap_symbols[current_section][symbol_address] = SymbolDetails(symbol_name, symbol_split[1][1:-1], False)
xmap_symbols[current_section][symbol_address] = SymbolDetails(symbol_name, symbol_split[1][1:-1], '.rodata' in line)
NON_FUNCTION_SYMBOLS = set(['$', '.'])
read_xmap_file(xmap_lines)