This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH 2/2] btrace: avoid symbol lookup
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: "jan dot kratochvil at redhat dot com" <jan dot kratochvil at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 10 Mar 2014 08:05:43 +0000
- Subject: RE: [PATCH 2/2] btrace: avoid symbol lookup
- Authentication-results: sourceware.org; auth=none
- References: <1394182665-14164-1-git-send-email-markus dot t dot metzger at intel dot com> <1394182665-14164-3-git-send-email-markus dot t dot metzger at intel dot com> <5319EBF6 dot 5090601 at redhat dot com>
> -----Original Message-----
> From: Pedro Alves [mailto:palves@redhat.com]
> Sent: Friday, March 07, 2014 4:56 PM
Thanks for your review.
> To: Metzger, Markus T
> Cc: jan.kratochvil@redhat.com; gdb-patches@sourceware.org
> Subject: Re: [PATCH 2/2] btrace: avoid symbol lookup
>
> On 03/07/2014 08:57 AM, Markus Metzger wrote:
> > --- a/gdb/testsuite/gdb.btrace/exception.exp
> > +++ b/gdb/testsuite/gdb.btrace/exception.exp
> > @@ -47,7 +47,7 @@ gdb_continue_to_breakpoint "cont to bp.2"
> ".*$srcfile:$bp_2\r\n.*"
> > send_gdb "record function-call-history 1\n"
> > gdb_expect_list "flat" "\r\n$gdb_prompt $" [list \
> > [join [list \
> > - "1\tmain\\(\\)" \
> > + "1\tmain" \
> > "2\ttest\\(\\)" \
> > "3\tfoo\\(\\)" \
> > "4\tbar\\(\\)" \
>
> I wonder whether people will think the different looks are a bug...
>
> Also, doesn't that mean we'll show mangled C++ names? Won't that
> be quite user unfriendly?
It would. Fortunately, GDB already prints the demangled name also for
minimal symbols - see MSYMBOL_PRINT_NAME which calls
symbol_natural_name. Minimal and full symbols seem to be treated the
same way.
This does not work for main, though, for which the minimal symbol has
language 'auto' and the full symbol has language 'cplus'.
Regards,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052