From 4e08e75dd7cc7ccf7e68e594467119b31d78a484 Mon Sep 17 00:00:00 2001 From: Elliot Nunn Date: Mon, 20 Sep 2021 09:36:27 +0800 Subject: [PATCH] Flattener: stringify MacsBug symbols --- FlattenSegmentedMacAppForDisassembler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FlattenSegmentedMacAppForDisassembler.py b/FlattenSegmentedMacAppForDisassembler.py index 5d1a5ad..a94a901 100755 --- a/FlattenSegmentedMacAppForDisassembler.py +++ b/FlattenSegmentedMacAppForDisassembler.py @@ -72,6 +72,9 @@ with open(args.dest + ".py", "w") as idascript: if not all(c in OKCHARS for c in name): continue + print(f"idaapi.make_ascii_string(0x{addr(r.id)+i+2:X}, {(namelen+2)&~1}, ASCSTR_PASCAL)", file=idascript) + print(f"set_cmt(0x{addr(r.id)+i+2:X}, 'MacsBug symbol', 0)", file=idascript) + possibles = [] for j in reversed(range(lastfound, i, 2)): if r[j : j + 2] == b"Nu":