]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
contrib/plugins/uftrace_symbols.py: filter out some addr2line error messages
authorPierrick Bouvier <pierrick.bouvier@linaro.org>
Wed, 18 Feb 2026 17:23:56 +0000 (09:23 -0800)
committerPierrick Bouvier <pierrick.bouvier@linaro.org>
Tue, 24 Feb 2026 01:32:40 +0000 (17:32 -0800)
This was found when tracing Hafnium and SLOF binaries, and it's probably
related to a bug in toolchain used. It's safe to ignore those entries,
and related symbols will still be present in output, whether they can be
found or not.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260218172356.938236-1-pierrick.bouvier@linaro.org
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
contrib/plugins/uftrace_symbols.py

index 21704541a6c161bd4fd22faf0e310189755a6b2a..7d79b81cdec171fe44efb6167418d29c0cab2b44 100755 (executable)
@@ -59,6 +59,9 @@ def find_symbols_locations(elf_file, symbols):
         print(e.output)
         raise
     out = out.strip().split('\n')
+    # filter out some addr2line error messages
+    skip_err='addr2line: DWARF error: mangled line number section (bad file number)'
+    out = [src for src in out if src != skip_err]
     assert len(out) == len(symbols)
     for i in range(len(symbols)):
         s = symbols[i]