This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code)
- From: Martin Galvan <martin dot galvan at tallertechnologies dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Mon, 11 May 2015 16:47:45 -0300
- Subject: Re: [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code)
- Authentication-results: sourceware.org; auth=none
- References: <1429802693-4582-1-git-send-email-martin dot galvan at tallertechnologies dot com> <CADPb22RFoQk_nSbtR=HuER_Lo0qa=+1gYU7a1Bh9n2KeDgUU0A at mail dot gmail dot com>
Sorry to bother but I didn't see this committed in the gdb repository.
I don't have write access, so could you please commit this for me?
Thanks a lot!
On Thu, Apr 23, 2015 at 12:52 PM, Doug Evans <dje@google.com> wrote:
> On Thu, Apr 23, 2015 at 8:24 AM, Martin Galvan
> <martin.galvan@tallertechnologies.com> wrote:
>> This bug was being caused by die_needs_namespace returning 0 for a DIE whose tag was DW_TAG_inlined_subroutine. This meant that dwarf2_physname would simply return the DIE's name attribute (which in our case would be "method"). Therefore, when new_symbol_full called SYMBOL_SET_NAMES, the linkagename argument wasn't the demangled name as it should have.
>>
>> This patch adds a case which would return 1 for DW_TAG_inlined_subroutine in die_needs_namespace. It's tested both for classes and namespaces.
>>
>> I have a company-wide copyright assignment. I don't have commit access, though, so it would be great if anyone could commit this for me.
>>
>> gdb/
>> 2015-04-23 Martin Galvan <martin.galvan@tallertechnologies.com>
>>
>> * dwarf2read.c (die_needs_namespace): Return 1 for
>> DW_TAG_inlined_subroutine.
>>
>> ---
>> gdb/dwarf2read.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
>> index f6b0c01..2bf3513 100644
>> --- a/gdb/dwarf2read.c
>> +++ b/gdb/dwarf2read.c
>> @@ -8357,6 +8357,7 @@ die_needs_namespace (struct die_info *die, struct dwarf2_cu *cu)
>> case DW_TAG_enumeration_type:
>> case DW_TAG_enumerator:
>> case DW_TAG_subprogram:
>> + case DW_TAG_inlined_subroutine:
>> case DW_TAG_member:
>> case DW_TAG_imported_declaration:
>> return 1;
>
> LGTM.
> I'll check it in.