From efe22205a1a850725a59fefb9b1856b3a29f825a Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Fri, 2 Sep 2022 18:54:58 -0700 Subject: [PATCH] Allow capturing of thunk rel::relocationid --- vr_address_tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vr_address_tools.py b/vr_address_tools.py index 4042627..0918fde 100755 --- a/vr_address_tools.py +++ b/vr_address_tools.py @@ -18,7 +18,8 @@ # old rel:id pattern rel::id(514167) RELID_PATTERN = r"(\w+){ REL::ID\(([0-9]+)\),*\s*([a-fx0-9])*\s+};" # po3 latest pattern RELOCATION_ID(SSE, AE) and REL_ID(SSE, AE, VR) -RELOCATION_ID_PATTERN = r"(?P\w+){ REL(?:OCATION)?_ID\((?P[0-9]+),+\s*(?P[0-9]*)\)(?:,\s*OFFSET(?:_3)?\((?P0x[a-f0-9]+)(?P,\s*0x[a-f0-9]+)?(?P,\s*0x[a-f0-9]+)?\))?\s*};" +# also stl::write_thunk_call(REL::RelocationID(35551, 36550).address() + REL::Relocate(0x11F, 0x11F)); +RELOCATION_ID_PATTERN = r"(?P[\w_]+)?(?:[{>(]* ?)?(?:rel::)?REL(?:OCATION)?_?ID\((?P[0-9]+),+\s*(?P[0-9]*)\)(?:,\s*OFFSET(?:_3)?\((?P0x[a-f0-9]+)(?P,\s*0x[a-f0-9]+)?(?P,\s*0x[a-f0-9]+)?\))?(?:\s*};)?" # commonlibsse-ng patterns constexpr REL::VariantID NiRTTI_BGSAddonNodeSoundHandleExtra(514633, 400793, 0x2f8a838); VARIANT_ID_PATTERN = r"REL::VariantID\s+(?P\w+)\((?P[0-9]+),+\s*(?P[0-9]*),+\s*0x(?P[a-f0-9]*)\);" ## These are regexes for parsing offset files that typically can help define relationships (older commonlibvr); po3 and ng now allow for definition through macro use