[PATCH 2/2] btrace: avoid symbol lookup

Metzger, Markus T markus.t.metzger@intel.com
Mon Mar 10 08:05:00 GMT 2014


> -----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



More information about the Gdb-patches mailing list