This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH v3 3/3] btrace, vdso: add vdso target sections
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 2 Jun 2014 09:42:59 +0000
- Subject: RE: [PATCH v3 3/3] btrace, vdso: add vdso target sections
- Authentication-results: sourceware.org; auth=none
- References: <1400655682-4014-1-git-send-email-markus dot t dot metzger at intel dot com> <1400655682-4014-3-git-send-email-markus dot t dot metzger at intel dot com> <5387663A dot 5040704 at redhat dot com> <53876874 dot 3080503 at redhat dot com> <A78C989F6D9628469189715575E55B230C182B51 at IRSMSX104 dot ger dot corp dot intel dot com>
> -----Original Message-----
> From: Metzger, Markus T
> Sent: Monday, June 2, 2014 10:21 AM
> To: Pedro Alves
> Cc: gdb-patches@sourceware.org
> Subject: RE: [PATCH v3 3/3] btrace, vdso: add vdso target sections
>
> Thanks for reporting this crash. I'll look into it. I thought I ran all tests
> for each patch in the vdso series.
>
> It seems btrace got broken, as well. I now get an assertion: "
> to_execution_direction must be implemented ...". The trivial solution
> of providing a to_execution_direction method that just returns
> execution_direction does not seem to work - or there's another
> bug underneath.
Looks like btrace got broken when async was made default and btrace
did not support it. I took the async bits from record-full and now at
least the btrace tests are running again. I'll send the patch in a separate
email.
Regards,
Markus.
>
> Regards,
> Markus.
>
> > -----Original Message-----
> > From: Pedro Alves [mailto:palves@redhat.com]
> > Sent: Thursday, May 29, 2014 7:04 PM
> > To: Metzger, Markus T
> > Cc: gdb-patches@sourceware.org
> > Subject: Re: [PATCH v3 3/3] btrace, vdso: add vdso target sections
> >
> > On 05/29/2014 05:54 PM, Pedro Alves wrote:
> > > Hi Markus,
> > >
> > > On 05/21/2014 08:01 AM, Markus Metzger wrote:
> > >> When loading symbols for the vdso, also add its sections to
> > target_sections.
> > >>
> > >> This fixes an issue with record btrace where vdso instructions could not
> be
> > >> disassembled during replay.
> > >>
> > >> 2014-05-21 Markus Metzger <markus.t.metzger@intel.com>
> > >>
> > >> * symfile-mem.c (symbol_file_add_from_memory): Add BFD
> > sections.
> > >
> > > Unfortunately this caused regressions in break-interp.exp:
> > >
> > > Running ../../../src/gdb/testsuite/gdb.base/break-interp.exp ...
> > > ERROR: Process no longer exists
> > >
> > > That is GDB crashing.
> > >
> > > 589fdceb99db9868e34bc976b7e234dbfaf327e2 is the first bad commit
> > > commit 589fdceb99db9868e34bc976b7e234dbfaf327e2
> > > Author: Markus Metzger <markus.t.metzger@intel.com>
> > > Date: Wed Apr 2 09:54:11 2014 +0200
> > >
> > > btrace, vdso: add vdso target sections
> > >
> > > When loading symbols for the vdso, also add its sections to
> > target_sections.
> > >
> > > This fixes an issue with record btrace where vdso instructions could not
> > be
> > > disassembled during replay.
> > >
> > > * symfile-mem.c (symbol_file_add_from_memory): Add BFD
> sections.
> > >
> > > testsuite/
> > > * gdb.btrace/vdso.c: New.
> > > * gdb.btrace/vdso.exp: New.
> > >
> > >
> > > Core was generated by
> > `/home/pedro/gdb/mygit/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-
> > directory'.
> > > Program terminated with signal SIGSEGV, Segmentation fault.
> > > #0 0x0000000000647bce in exec_set_section_address
> > (filename=0x27bb1f0
> > "/home/pedro/gdb/mygit/build/gdb/testsuite/gdb.base/break-interp-
> > LDprelinkNOdebugNO", index=0,
> > > address=139930618982856) at ../../src/gdb/exec.c:919
> > > 919 if (filename_cmp (filename, p->the_bfd_section->owner-
> > >filename) == 0
> >
> > 'p', a target section, points at garbage.
> >
> > Hmm, wait, nothing is removing the vdso symbols target sections, like ever,
> > not even when the process dies, isn't it? I guess that's it.
> >
> > --
> > Pedro Alves
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