From b5730852272f086e00848f15b131c422fab05390 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Tue, 7 Jun 2022 11:28:49 -0700 Subject: [PATCH] avxjudge: adjust regex for matching function names Golang binaries have been observed to contain function names with many other ASCII characters not captured by the previous regex. Adjust that regex by permitting arbitrary characters for the function name component of the line (between the ` <` and `>:`) and declaring the expected content for the rest of the line. Signed-off-by: Patrick McCarty --- avxjudge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avxjudge.py b/avxjudge.py index 5aa4ac8..0744947 100644 --- a/avxjudge.py +++ b/avxjudge.py @@ -239,7 +239,7 @@ def process_objdump_line(records:RecordKeeper, line:str, verbose:int, quiet:int) records.function_record.instructions += 1 - match = re.search("\<([a-zA-Z0-9_@\.\-]+)\>\:", line) + match = re.search(r'^[0-9a-f]+ <(.+)>:$', line) if match: records.function_record.name = match.group(1)