Skip to contentSkip to conversation

contrib/plugins/uftrace_symbols.py: unbreak --no-prefix-symbols

PATCH Applied Sönke Holz 3 participants 4 messages Dec 5, 2025

lore
Share & tools
lore
Reviewed-by on v1 1/1
#1 lore raw
In reply to Sönke Holz
Quoted 13 lines · Sönke Holz

Since 8a545a336d, name is unbound if --no-prefix-symbols is passed, causing this script to break when that option is set.

---
  contrib/plugins/uftrace_symbols.py | 2 ++
  1 file changed, 2 insertions(+)
contrib/plugins/uftrace_symbols.py +0 -0
index 45fb79c7a5..21704541a6 100755

contrib/plugins/uftrace_symbols.py def generate_symbol_file(self, prefix_symbols): · line 105

Quoted 8 lines
contrib/plugins/uftrace_symbols.py +2 -0
@@ -98,6 +98,8 @@ def generate_symbol_file(self, prefix_symbols):
                  size = f'{s.size:{addrx}}'
                  if prefix_symbols:
                      name = f'{binary_name}:{s.name}'
+                else:
+                    name = s.name
                  print(addr, size, 'T', name, file=sym_file)
 
      def generate_debug_file(self):

Thanks for catching it, I was indeed always using this option for testing.

#2 lore raw
Quoted 21 lines · Pierrick Bouvier
Quoted 20 lines · Sönke Holz

Since 8a545a336d, name is unbound if --no-prefix-symbols is passed, causing this script to break when that option is set.

---
   contrib/plugins/uftrace_symbols.py | 2 ++
   1 file changed, 2 insertions(+)
contrib/plugins/uftrace_symbols.py +2 -0
index 45fb79c7a5..21704541a6 100755
@@ -98,6 +98,8 @@ def generate_symbol_file(self, prefix_symbols):
                   size = f'{s.size:{addrx}}'
                   if prefix_symbols:
                       name = f'{binary_name}:{s.name}'
+                else:
+                    name = s.name
                   print(addr, size, 'T', name, file=sym_file)
 
Quoted 5 lines

contrib/plugins/uftrace_symbols.py def generate_symbol_file(self, prefix_symbols): · line 105

Quoted 1 line
contrib/plugins/uftrace_symbols.py +0 -0
       def generate_debug_file(self):

Thanks for catching it, I was indeed always using this option for testing.

@alex.bennée, any chance it can be integrated for release, when you will pull Final fixes for 10.2?

Thanks,
Pierrick

#0 lore raw

PATCH 1/1 contrib/plugins/uftrace_symbols.py: unbreak --no-prefix-symbols

Since 8a545a336d, name is unbound if --no-prefix-symbols is passed, causing this script to break when that option is set.

---
 contrib/plugins/uftrace_symbols.py | 2 ++
 1 file changed, 2 insertions(+)
contrib/plugins/uftrace_symbols.py +2 -0
index 45fb79c7a5..21704541a6 100755
@@ -98,6 +98,8 @@ def generate_symbol_file(self, prefix_symbols):
                 size = f'{s.size:{addrx}}'
                 if prefix_symbols:
                     name = f'{binary_name}:{s.name}'
+                else:
+                    name = s.name
                 print(addr, size, 'T', name, file=sym_file)
 
     def generate_debug_file(self):
Signature · 1 line
2.52.0
Applied
#3 lore raw
Quoted 4 lines · Sönke Holz

Since 8a545a336d, name is unbound if --no-prefix-symbols is passed, causing this script to break when that option is set.

Queued to pr/051225-10.2-final-fixes-1, thanks.

Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro