[PATCH] contrib/plugins/uftrace_symbols.py: filter out some addr2line error messages

Pierrick Bouvier posted 1 patch 1 month, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260218172356.938236-1-pierrick.bouvier@linaro.org
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>
contrib/plugins/uftrace_symbols.py | 3 +++
1 file changed, 3 insertions(+)
[PATCH] contrib/plugins/uftrace_symbols.py: filter out some addr2line error messages
Posted by Pierrick Bouvier 1 month, 3 weeks ago
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.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 contrib/plugins/uftrace_symbols.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/plugins/uftrace_symbols.py b/contrib/plugins/uftrace_symbols.py
index 21704541a6c..7d79b81cdec 100755
--- a/contrib/plugins/uftrace_symbols.py
+++ b/contrib/plugins/uftrace_symbols.py
@@ -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]
-- 
2.47.3
Re: [PATCH] contrib/plugins/uftrace_symbols.py: filter out some addr2line error messages
Posted by Pierrick Bouvier 1 month, 2 weeks ago
On 2/18/26 9:23 AM, Pierrick Bouvier wrote:
> 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.
> 
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   contrib/plugins/uftrace_symbols.py | 3 +++
>   1 file changed, 3 insertions(+)
> 

This was merged into master (ba061eb352831adde73b6ff520169bf307be6bbd).

Regards,
Pierrick
Re: [PATCH] contrib/plugins/uftrace_symbols.py: filter out some addr2line error messages
Posted by Philippe Mathieu-Daudé 1 month, 2 weeks ago
On 18/2/26 18:23, Pierrick Bouvier wrote:
> 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.
> 
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   contrib/plugins/uftrace_symbols.py | 3 +++
>   1 file changed, 3 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>