[PATCH][binutils] Fix debug_rnglists test in display_debug_ranges

Tom de Vries tdevries@suse.de
Tue Feb 9 16:56:54 GMT 2021


On 2/9/21 4:12 PM, Tom de Vries wrote:
> On 2/9/21 3:46 PM, Tom de Vries wrote:
>> Hi,
>>
>> With exec:
>> ...
>> $ g++ src/gdb/testsuite/gdb.cp/cpexprs.cc -gdwarf-5 -fdebug-types-section
>> ...
>> I run into:
>> ...
>> $ readelf -w a.out > READELF
>> readelf: Error: Invalid range list entry type 126
>> readelf: Error: Invalid range list entry type 60
>> ...
>>
>> The problem is that the is_rnglists test in display_debug_ranges fails,
>> because the section name is prefixed with a dot:
>> ...
>> (gdb) p section->name
>> $3 = 0x4f4ad4 ".debug_rnglists"
>> ...
>> and the comparison is done using a string without such a prefix:
>> ...
>>      int is_rnglists = strstr (section->name, "debug_rnglists") != NULL;
>> ...
>>
>> Fix this by adding the missing dot prefix in the comparison.
>>
>> OK for trunk?
>>
> 
> Sorry, while the patch is not incorrect, it doesn't yet fix the errors,
> there's more to fix it seems.
> 

Updated patch, which fixes the errors.

OK for trunk?

Thanks,
- Tom


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-binutils-Fix-debug_rnglists-test-in-display_debug_ranges.patch
Type: text/x-patch
Size: 3086 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20210209/cf53c31a/attachment.bin>


More information about the Binutils mailing list