From 6b2e7aabb79f7825568985a9138394dee06b76de Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Thu, 23 Aug 2012 18:44:01 +0300 Subject: wafsamba/samba_abi: fix signature parsing for structures Signature parsing for structure objects was broken. Existing regexp was greedingly cutting off additional curly brackets that belonged to the first and last structure member. --- buildtools/wafsamba/samba_abi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'buildtools') diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py index 2966d7c1bf..69da7bd9a5 100644 --- a/buildtools/wafsamba/samba_abi.py +++ b/buildtools/wafsamba/samba_abi.py @@ -15,8 +15,9 @@ version_key = lambda x: map(int, x.split(".")) def normalise_signature(sig): '''normalise a signature from gdb''' sig = sig.strip() - sig = re.sub('^\$[0-9]+\s=\s\{*', '', sig) - sig = re.sub('\}(\s0x[0-9a-f]+\s<\w+>)?$', '', sig) + sig = re.sub('^\$[0-9]+\s=\s\{(.+)\}$', r'\1', sig) + sig = re.sub('^\$[0-9]+\s=\s\{(.+)\}(\s0x[0-9a-f]+\s<\w+>)+$', r'\1', sig) + sig = re.sub('^\$[0-9]+\s=\s(0x[0-9a-f]+)\s?(<\w+>)?$', r'\1', sig) sig = re.sub('0x[0-9a-f]+', '0xXXXX', sig) sig = re.sub('", ', r'\1"', sig) -- cgit