From 686bc44b961ff2b960e8bf92fe3114dd14305a52 Mon Sep 17 00:00:00 2001 From: Devon R Date: Thu, 5 Mar 2026 12:55:26 +0000 Subject: [PATCH 1/8] Update symbol_addrs script to work with current codebase --- tools/update_symbol_addrs.py | 121 +++++++++++++++++++---------------- 1 file changed, 67 insertions(+), 54 deletions(-) diff --git a/tools/update_symbol_addrs.py b/tools/update_symbol_addrs.py index c3df51f049e..93d842045cf 100755 --- a/tools/update_symbol_addrs.py +++ b/tools/update_symbol_addrs.py @@ -1,60 +1,86 @@ #!/usr/bin/env python3 -import os +import pathlib import re import subprocess import sys +import typing + import tqdm -script_dir = os.path.dirname(os.path.realpath(__file__)) -root_dir = script_dir + "/../" -current_ver_dir = script_dir + "/../ver/current/" -asm_dir = root_dir + "asm/nonmatchings/" +# Always the same +SCRIPT_DIRECTORY = pathlib.Path(__file__).parent +ROOT_DIRECTORY = SCRIPT_DIRECTORY.parent +VERSION_DIRECTORY = ROOT_DIRECTORY / 'ver' +AVAILABLE_VERSIONS = [item.name for item in VERSION_DIRECTORY.iterdir() if item.is_dir()] + +ASM_DIRECTORY = ROOT_DIRECTORY / 'asm' / 'nonmatchings' +IGNORES_PATH = ROOT_DIRECTORY / 'tools' / 'ignored_funcs.txt' + +IGNORE_RE = re.compile(r"(?P\S+)\s*=\s*0[xX](?P
[0-9a-fA-F]+);") +MAP_BLOCK_RE = re.compile(r"(?:\.(?P