[PATCH] [gdb/symtab] Handle PU in iterate_over_some_symtabs
Tom de Vries
tdevries@suse.de
Wed Sep 6 07:31:29 GMT 2023
On 9/5/23 18:45, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Tom> This happens because the PU imported by the CU reuses the filetab of the CU,
> Tom> and both the CU and PU are visited by iterate_over_some_symtabs.
>
> Tom> Fix this by skipping PUs in iterate_over_some_symtabs.
>
> Looks good to me.
> Approved-By: Tom Tromey <tom@tromey.com>
>
Thanks for the review.
> I wonder what would happen if we simply left included CUs off the linked list.
> Is it ever worthwhile to search them?
I gave that a try (WIP patch attached).
That fixes this PR, and interestingly, it fixes another PR for which I
have a similar, skip-PU patch pending (
https://sourceware.org/pipermail/gdb-patches/2023-August/201905.html ).
I've tested it with the cc-with-dwz target board and ran into a
regression though:
...
FAIL: gdb.cp/m-static.exp: static const int initialized in class definition
FAIL: gdb.cp/m-static.exp: static const float initialized in class
definition
...
Perhaps somewhere we assume that the PU is part off the linked list and
we skip searching in the includes.
Thanks,
- Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-try.patch
Type: text/x-patch
Size: 2101 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/gdb-patches/attachments/20230906/151c2ef9/attachment.bin>
More information about the Gdb-patches
mailing list