This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] btrace, vdso: add vdso target sections


> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Pedro Alves
> Sent: Friday, May 16, 2014 3:00 PM

Thanks for your review.


> Looks largely fine, but ...
> 
> On 04/04/2014 09:53 AM, Markus Metzger wrote:
> 
> > @@ -131,6 +133,27 @@ symbol_file_add_from_memory (struct bfd
> *templ, CORE_ADDR addr,
> >  				   from_tty ? SYMFILE_VERBOSE : 0,
> >                                     sai, OBJF_SHARED, NULL);
> >
> > +  if (add_sections)
> > +    {
> ...
> 
> Why is this conditional?  Why not add the sections if the symbols are
> added manually with add-symbol-file-from-memory?  The use case for the
> command was originally exactly to add the vdso's symbols to GDB.

This function is used by the add-symbol-file-from-memory command, as well.

I'm not sure if we want to add the target sections there, as well.


> > +# trace the test code
> > +gdb_test_no_output "record btrace"
> > +gdb_test "next"
> 
> Please add a pattern that makes sure the "next" actually
> finished successfully.

OK.


> > +# disassemble the code around the current PC
> > +gdb_test "disassemble \$pc, +10" [join [list \
> > +	".*" \
> > +	"End of assembler dump\." \
> > +    ] "\r\n"]
> 
> What is the error one gets without the fix?  Doesn't
> GDB say "End of assembler dump" in that case too?

No.  GDB says "Cannot access memory at address ...".

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]