From 5881164453ddd540e120669eb19bf9cdd3136b78 Mon Sep 17 00:00:00 2001 From: cadmic Date: Sun, 17 Nov 2024 14:34:23 -0800 Subject: [PATCH] Fix VROM address handling in sym_info.py (#2292) --- sym_info.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sym_info.py b/sym_info.py index feeb95da73..9fec30b581 100755 --- a/sym_info.py +++ b/sym_info.py @@ -20,7 +20,23 @@ def symInfoMain(): if args.use_expected: mapPath = "expected" / BUILTMAP - mapfile_parser.frontends.sym_info.doSymInfo(mapPath, args.symname) + # Guess if the input is an VROM/VRAM or a symbol name + as_vram = False + as_vrom = False + as_name = False + try: + address = int(args.symname, 0) + if address >= 0x01000000: + as_vram = True + else: + as_vrom = True + except ValueError: + as_name = True + + mapfile_parser.frontends.sym_info.doSymInfo( + mapPath, args.symname, as_vram=as_vram, as_vrom=as_vrom, as_name=as_name + ) + if __name__ == "__main__": symInfoMain()