This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH]Add symbol whose field 'has_type' has been set to partial symbol table
- From: Tom Tromey <tromey at redhat dot com>
- To: hex <heixia108 at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 24 Oct 2013 14:31:18 -0600
- Subject: Re: [PATCH]Add symbol whose field 'has_type' has been set to partial symbol table
- Authentication-results: sourceware.org; auth=none
- References: <CAB_AMN4CyoKKjd=_51d+a25HPnj=TK5aQTxGH321tkjtjOyg5Q at mail dot gmail dot com>
>>>>> ">" == hex <heixia108@gmail.com> writes:
>> // Then compile it with `gcc -g -c test.c`(For the lastest GCC, we
>> need use 'gcc -g -O1 -c test.' to get the following DIE)
>> We could see the DIE of 'var' is as following:
>> <1><25>: Abbrev Number: 2 (DW_TAG_variable)
>> <26> DW_AT_name : var
>> <2a> DW_AT_decl_file : 1
>> <2b> DW_AT_decl_line : 1
>> <2c> DW_AT_type : <0x31>
>> <30> DW_AT_const_value : 3
>> Latest GDB will not add it to partial symbol table because its symbol
>> satisfies 'pdi->d.locdesc == NULL'. I think we need add it to partial
>> symbol table.
This patch seems reasonable to me, but I think it needs a test case.
This should be easy to write using the DWARF assembler in the test suite.
Tom