[PATCH] Fix toplevel types with -fdebug-types-section

Simon Marchi simark@simark.ca
Sun Jan 19 02:10:00 GMT 2020


On 2020-01-18 8:59 p.m., Simon Marchi wrote:
> On 2020-01-18 1:53 p.m., Mark Williams wrote:
>> Per https://sourceware.org/bugzilla/show_bug.cgi?id=24480 toplevel
>> types were broken by
>> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=93b8bea4143cafae79076076c64aaa4c46a9b73c
>> because it only set list_in_scope in start_sym_tab. With type-units,
>> It also needs to be set when re-opening a symtab.
>>
>> Mark
>>
> 
> Hi Mark,
> 
> Thanks for sending a patch.
> 
> Can you please put a bit more information in the commit message?  In particular:
> 
> - An illustration of the problem, and how to reproduce it
> - Why/how this patch fixes the problem
> 
> There are good elements about that in the bug report discussions, it's just a matter
> of synthesizing them in the commit message.
> 
> Thanks,
> 
> Simon
> 

Oh, and also we try our best to add a test (in gdb/testsuite) when we fix a bug, so
that this particular bug doesn't come back later.  I think this is something that
would be pretty easy to test.  That test would probably belong in testsuite/gdb.dwarf2,
since this is quite dwarf-specific.

There are hints on how to write tests here:

https://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Building_the_Example_Program

Simon



More information about the Gdb-patches mailing list