* [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code) @ 2015-04-23 15:25 Martin Galvan 2015-04-23 15:52 ` Doug Evans 0 siblings, 1 reply; 8+ messages in thread From: Martin Galvan @ 2015-04-23 15:25 UTC (permalink / raw) To: gdb-patches 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; -- 2.3.5 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code) 2015-04-23 15:25 [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code) Martin Galvan @ 2015-04-23 15:52 ` Doug Evans 2015-04-23 15:53 ` Martin Galvan ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Doug Evans @ 2015-04-23 15:52 UTC (permalink / raw) To: Martin Galvan; +Cc: gdb-patches 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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code) 2015-04-23 15:52 ` Doug Evans @ 2015-04-23 15:53 ` Martin Galvan 2015-05-11 19:48 ` Martin Galvan 2015-05-13 20:58 ` Doug Evans 2 siblings, 0 replies; 8+ messages in thread From: Martin Galvan @ 2015-04-23 15:53 UTC (permalink / raw) To: Doug Evans; +Cc: gdb-patches On Thu, Apr 23, 2015 at 12:52 PM, Doug Evans <dje@google.com> wrote: > LGTM. > I'll check it in. Thanks a lot! ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code) 2015-04-23 15:52 ` Doug Evans 2015-04-23 15:53 ` Martin Galvan @ 2015-05-11 19:48 ` Martin Galvan 2015-05-13 20:58 ` Doug Evans 2 siblings, 0 replies; 8+ messages in thread From: Martin Galvan @ 2015-05-11 19:48 UTC (permalink / raw) To: Doug Evans; +Cc: gdb-patches 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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code) 2015-04-23 15:52 ` Doug Evans 2015-04-23 15:53 ` Martin Galvan 2015-05-11 19:48 ` Martin Galvan @ 2015-05-13 20:58 ` Doug Evans 2015-05-13 21:05 ` Martin Galvan 2 siblings, 1 reply; 8+ messages in thread From: Doug Evans @ 2015-05-13 20:58 UTC (permalink / raw) To: Martin Galvan; +Cc: gdb-patches On Thu, Apr 23, 2015 at 8:52 AM, 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. Committed. I forgot the extra step of setting the author correctly, but it's just one line so I'm leaving it. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code) 2015-05-13 20:58 ` Doug Evans @ 2015-05-13 21:05 ` Martin Galvan 2015-05-13 21:10 ` Doug Evans 0 siblings, 1 reply; 8+ messages in thread From: Martin Galvan @ 2015-05-13 21:05 UTC (permalink / raw) To: Doug Evans; +Cc: gdb-patches On Wed, May 13, 2015 at 5:58 PM, Doug Evans <dje@google.com> wrote: > On Thu, Apr 23, 2015 at 8:52 AM, 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. > > Committed. > > I forgot the extra step of setting the author correctly, but it's just > one line so I'm leaving it. Well, considering that it solves a quite important issue and it took me a really long time to find it, fix it, and then get it commited, it'd be nice of you if you could fix the author :) ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code) 2015-05-13 21:05 ` Martin Galvan @ 2015-05-13 21:10 ` Doug Evans 2015-05-13 21:13 ` Martin Galvan 0 siblings, 1 reply; 8+ messages in thread From: Doug Evans @ 2015-05-13 21:10 UTC (permalink / raw) To: Martin Galvan; +Cc: gdb-patches On Wed, May 13, 2015 at 2:04 PM, Martin Galvan <martin.galvan@tallertechnologies.com> wrote: > On Wed, May 13, 2015 at 5:58 PM, Doug Evans <dje@google.com> wrote: >> On Thu, Apr 23, 2015 at 8:52 AM, 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. >> >> Committed. >> >> I forgot the extra step of setting the author correctly, but it's just >> one line so I'm leaving it. > > Well, considering that it solves a quite important issue and it took > me a really long time to find it, fix it, and then get it commited, > it'd be nice of you if you could fix the author :) Done. Time to get yourself commit access. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code) 2015-05-13 21:10 ` Doug Evans @ 2015-05-13 21:13 ` Martin Galvan 0 siblings, 0 replies; 8+ messages in thread From: Martin Galvan @ 2015-05-13 21:13 UTC (permalink / raw) To: Doug Evans; +Cc: gdb-patches On Wed, May 13, 2015 at 6:10 PM, Doug Evans <dje@google.com> wrote: > On Wed, May 13, 2015 at 2:04 PM, Martin Galvan > <martin.galvan@tallertechnologies.com> wrote: >> On Wed, May 13, 2015 at 5:58 PM, Doug Evans <dje@google.com> wrote: >>> >>> Committed. >>> >>> I forgot the extra step of setting the author correctly, but it's just >>> one line so I'm leaving it. >> >> Well, considering that it solves a quite important issue and it took >> me a really long time to find it, fix it, and then get it commited, >> it'd be nice of you if you could fix the author :) > > Done. > > Time to get yourself commit access. Thanks a lot! -- Martin Galvan Software Engineer Taller Technologies Argentina San Lorenzo 47, 3rd Floor, Office 5 Córdoba, Argentina Phone: 54 351 4217888 / +54 351 4218211 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-05-13 21:13 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-04-23 15:25 [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code) Martin Galvan 2015-04-23 15:52 ` Doug Evans 2015-04-23 15:53 ` Martin Galvan 2015-05-11 19:48 ` Martin Galvan 2015-05-13 20:58 ` Doug Evans 2015-05-13 21:05 ` Martin Galvan 2015-05-13 21:10 ` Doug Evans 2015-05-13 21:13 ` Martin Galvan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).