Re: [PATCH] Fix for the complaint observed when symbol reading due to unsupported .debug_names form.

Tom de Vries
2020-05-08T14:36:25Z

On 07-05-2020 15:26, Tom Tromey wrote:
>>>>>> ">" == nitachra <Nitika.Achra@amd.com> writes:
>
>>> Following complaint is observed with the executable compiled with -gdwarf-5
>>> and -gpubnames flags- "During symbol reading: Unsupported .debug_names form
>>> DW_FORM_ref4". This is the form corresponding to DW_IDX_die_offset attribute.
>>> This patch fixes this complaint. Tested with clang 10.0.0. Test case used-
>
>>> int main()
>>> {
>>> int sum,a,b;
>>> sum = a + b;
>>> return sum;
>>> }
>
> Does it fail some existing test in the gdb testsuite?

I don't think so, that is, not unless you use:
- clang as CC_FOR_TARGET, and
- target board unix/-gdwarf-5/-gpubnames.

> Normally what we like to see is either that a patch fixes some existing
> failure (perhaps when the test suite is run in a certain way); or a new
> test that fails before the patch and passes afterward.
>

I've add a dwarf assembly test-case for this (
https://sourceware.org/pipermail/gdb-patches/2020-May/168244.html ).

It should kfail without this patch, and pass with this patch (though it
doesn't pass for me on openSUSE due to the problem described in PR25941).

Thanks,
- Tom