From 21a92ab95f2b57b81e90fc0e376527f4e45b46f3 Mon Sep 17 00:00:00 2001 From: Roman971 <32455037+Roman971@users.noreply.github.com> Date: Fri, 3 Dec 2021 15:11:49 +0100 Subject: [PATCH] Fix sym_info.py and first_diff.py map lookup issues (#1055) Symbol names like qNaN0x3FFFFF were detected as new sections in the map, which broke lookups for some sections of the ROM --- first_diff.py | 4 ++-- sym_info.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/first_diff.py b/first_diff.py index fff96557a1..3b8a9dd46a 100755 --- a/first_diff.py +++ b/first_diff.py @@ -93,7 +93,7 @@ def search_rom_address(target_addr): rom = ram - ram_offset sym = line.split()[-1] - if "0x" in sym: + if sym.startswith("0x"): ram_offset = None continue if "/" in sym: @@ -139,7 +139,7 @@ def parse_map(map_fname): rom = ram - ram_offset sym = line.split()[-1] - if "0x" in sym: + if sym.startswith("0x"): ram_offset = None continue elif "/" in sym: diff --git a/sym_info.py b/sym_info.py index ae70bf0501..ed37d6ce29 100755 --- a/sym_info.py +++ b/sym_info.py @@ -64,8 +64,8 @@ def search_address(target_addr): ram = int(line[16 : 16 + 18], 0) rom = ram - ram_offset sym = line.split()[-1] - - if "0x" in sym: + + if sym.startswith("0x"): ram_offset = None continue if "/" in sym: @@ -112,7 +112,7 @@ def search_symbol(target_sym): rom = ram - ram_offset sym = line.split()[-1] - if "0x" in sym: + if sym.startswith("0x"): ram_offset = None continue elif "/" in sym: