[PATCH v2] dwarf: Dump .debug_loclists only for DWARF-5
Jan Beulich
jbeulich@suse.com
Tue Mar 25 07:32:26 GMT 2025
On 24.03.2025 19:38, H.J. Lu wrote:
> On Mon, Mar 24, 2025 at 9:42 AM Jan Beulich <jbeulich@suse.com> wrote:
>>
>> On 24.03.2025 17:27, H.J. Lu wrote:
>>> On Mon, Mar 24, 2025 at 9:23 AM Jan Beulich <jbeulich@suse.com> wrote:
>>>>
>>>> On 24.03.2025 17:18, H.J. Lu wrote:
>>>>> .debug_loclists section is loaded into debug_information as DWARF-5 debug
>>>>> info and .debug_loc section is loaded into debug_information as pre-DWARF-5
>>>>> debug info. When dumping .debug_loc section, we should only process
>>>>> pre-DWARF-5 debug info in debug_information. When dumping .debug_loclists
>>>>> section, we should only process DWARF-5 info in debug_information.
>>>>>
>>>>> binutils/
>>>>>
>>>>> PR binutils/32809
>>>>> * dwarf.c (display_debug_loc): Dump .debug_loclists only for
>>>>> DWARF-5.
>>>>>
>>>>> ld/
>>>>>
>>>>> PR binutils/32809
>>>>> * testsuite/ld-x86-64/dwarf4.s: New file.
>>>>> * testsuite/ld-x86-64/dwarf5a.s: Likewise.
>>>>> * testsuite/ld-x86-64/dwarf5b.s: Likewise.
>>>>> * testsuite/ld-x86-64/pr32809.d: Likewise.
>>>>> * testsuite/ld-x86-64/x86-64.exp: Run pr32809.
>>>>>
>>>>> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
>>>>
>>>> Okay. I'd like to mention though that I dislike the kind of testcases you add
>>>> here. How in the world is someone supposed to be able to reasonably quickly
>>>> establish what the source files are supposed to be doing, when they're
>>>> (apparently) bare, un-commented compiler generated code? And not even stripped
>>>> of anything that's obviously unrelated to the tests (like .ident).
>>>
>>> Can you come up with a testcase in assembly so that it works with
>>> a cross binutils?
>>
>> Why would it need to be me to massage a set of sources I don't understand?
>> (I didn't ask anyway to write something from scratch; that's an option, but
>> not a requirement. What I suggested was that such compiler output would
>> better be at least lightly commented.)
>
> I am not a DWARF expert and not qualified to comment on compiler
> DWARF outputs.
Hmm. If even you as the contributor don't feel in the position of making that
testcase somewhat possible to follow, who is? I'm close to withdrawing my
"okay" in this situation, as for any issue with a testcase we'd primarily
turn back to the contributor. (After all there's always the [however small]
possibility of the compiler output not being quite right.) Yet in the
interest of getting the issue fixed, I'll stick to what I said before. In the
future I may reject such testcases, though.
Jan
More information about the Binutils
mailing list