[PATCH] Ignore .debug_types when reading .debug_aranges
Simon Marchi
simon.marchi@polymtl.ca
Mon Aug 9 12:27:37 GMT 2021
On 2021-08-08 11:39 a.m., Tom Tromey wrote:
> I noticed that the fission-reread.exp test case can cause a complaint
> when run with --target_board=cc-with-debug-names:
>
> warning: Section .debug_aranges in [...]/fission-reread has duplicate debug_info_offset 0x0, ignoring .debug_aranges.
>
> The bug here is that this executable has both .debug_info and
> .debug_types, and both have a CU at offset 0x0. This triggers the
> duplicate warning.
>
> Because .debug_types doesn't provide any address ranges, these CUs can
> be ignored. That is, this bug turns out to be another regression from
> the info/types merger patch.
>
> This patch fixes the problem by having this loop igore type units.
> fission-reread.exp is updated to test for the bug.
I didn't dive deep in the code, but from your explanation and a quick glance
at the code, that makes sense.
Simon
More information about the Gdb-patches
mailing list