2020-06-07 14:37:48 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import argparse
|
2023-08-01 02:30:26 +00:00
|
|
|
from pathlib import Path
|
2020-06-07 14:37:48 +00:00
|
|
|
|
2024-01-25 00:03:57 +00:00
|
|
|
import mapfile_parser
|
2020-06-07 14:37:48 +00:00
|
|
|
|
|
|
|
|
2023-08-01 02:30:26 +00:00
|
|
|
def symInfoMain():
|
|
|
|
parser = argparse.ArgumentParser(description="Display various information about a symbol or address.")
|
|
|
|
parser.add_argument("symname", help="symbol name or VROM/VRAM address to lookup")
|
2024-09-04 18:49:16 +00:00
|
|
|
parser.add_argument("-v", "--version", dest="oot_version", help="Which version should be processed", default="gc-eu-mq-dbg")
|
2023-08-01 02:30:26 +00:00
|
|
|
parser.add_argument("-e", "--expected", dest="use_expected", action="store_true", help="use the map file in expected/build/ instead of build/")
|
2020-06-07 14:37:48 +00:00
|
|
|
|
2023-08-01 02:30:26 +00:00
|
|
|
args = parser.parse_args()
|
2020-06-07 14:37:48 +00:00
|
|
|
|
2024-02-02 21:34:20 +00:00
|
|
|
BUILTMAP = Path("build") / args.oot_version / f"oot-{args.oot_version}.map"
|
2020-06-07 14:37:48 +00:00
|
|
|
|
2023-08-01 02:30:26 +00:00
|
|
|
mapPath = BUILTMAP
|
|
|
|
if args.use_expected:
|
|
|
|
mapPath = "expected" / BUILTMAP
|
2020-06-07 14:37:48 +00:00
|
|
|
|
2023-08-01 02:30:26 +00:00
|
|
|
mapfile_parser.frontends.sym_info.doSymInfo(mapPath, args.symname)
|
2020-06-13 01:56:17 +00:00
|
|
|
|
2023-08-01 02:30:26 +00:00
|
|
|
if __name__ == "__main__":
|
|
|
|
symInfoMain()
|