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

Sönke Holz posted 1 patch 1 week, 1 day ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251205105614.13673-1-sholz8530@gmail.com
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>, Pierrick Bouvier <pierrick.bouvier@linaro.org>
contrib/plugins/uftrace_symbols.py | 2 ++
1 file changed, 2 insertions(+)
[PATCH] contrib/plugins/uftrace_symbols.py: unbreak --no-prefix-symbols
Posted by Sönke Holz 1 week, 1 day ago
Since 8a545a336d, `name` is unbound if --no-prefix-symbols is passed,
causing this script to break when that option is set.

Signed-off-by: Sönke Holz <sholz8530@gmail.com>
---
 contrib/plugins/uftrace_symbols.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/plugins/uftrace_symbols.py b/contrib/plugins/uftrace_symbols.py
index 45fb79c7a5..21704541a6 100755
--- a/contrib/plugins/uftrace_symbols.py
+++ b/contrib/plugins/uftrace_symbols.py
@@ -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):
-- 
2.52.0


Re: [PATCH] contrib/plugins/uftrace_symbols.py: unbreak --no-prefix-symbols
Posted by Alex Bennée 1 week, 1 day ago
Sönke Holz <sholz8530@gmail.com> writes:

> Since 8a545a336d, `name` is unbound if --no-prefix-symbols is passed,
> causing this script to break when that option is set.
>
> Signed-off-by: Sönke Holz <sholz8530@gmail.com>

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

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH] contrib/plugins/uftrace_symbols.py: unbreak --no-prefix-symbols
Posted by Pierrick Bouvier 1 week, 1 day ago
On 12/5/25 2:56 AM, Sönke Holz wrote:
> Since 8a545a336d, `name` is unbound if --no-prefix-symbols is passed,
> causing this script to break when that option is set.
> 
> Signed-off-by: Sönke Holz <sholz8530@gmail.com>
> ---
>   contrib/plugins/uftrace_symbols.py | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/contrib/plugins/uftrace_symbols.py b/contrib/plugins/uftrace_symbols.py
> index 45fb79c7a5..21704541a6 100755
> --- a/contrib/plugins/uftrace_symbols.py
> +++ b/contrib/plugins/uftrace_symbols.py
> @@ -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.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>


Re: [PATCH] contrib/plugins/uftrace_symbols.py: unbreak --no-prefix-symbols
Posted by Pierrick Bouvier 1 week, 1 day ago
On 12/5/25 6:02 AM, Pierrick Bouvier wrote:
> On 12/5/25 2:56 AM, Sönke Holz wrote:
>> Since 8a545a336d, `name` is unbound if --no-prefix-symbols is passed,
>> causing this script to break when that option is set.
>>
>> Signed-off-by: Sönke Holz <sholz8530@gmail.com>
>> ---
>>    contrib/plugins/uftrace_symbols.py | 2 ++
>>    1 file changed, 2 insertions(+)
>>
>> diff --git a/contrib/plugins/uftrace_symbols.py b/contrib/plugins/uftrace_symbols.py
>> index 45fb79c7a5..21704541a6 100755
>> --- a/contrib/plugins/uftrace_symbols.py
>> +++ b/contrib/plugins/uftrace_symbols.py
>> @@ -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.
> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> 

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

Thanks,
Pierrick