This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: vdso handling
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Pedro Alves <palves at redhat dot com>, Alan Modra <amodra at gmail dot com>
- Cc: Mark Wielaard <mjw at redhat dot com>, Cary Coutant <ccoutant at google dot com>, "Doug Evans" <dje at google dot com>, "gdb at sourceware dot org" <gdb at sourceware dot org>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 26 Mar 2014 09:32:13 +0000
- Subject: RE: vdso handling
- Authentication-results: sourceware.org; auth=none
- References: <20140313010147 dot GZ26922 at bubble dot grove dot modra dot org> <1394704336 dot 11818 dot 115 dot camel at bordewijk dot wildebeest dot org> <20140313130322 dot GA3384 at bubble dot grove dot modra dot org> <5321C7C8 dot 6000707 at redhat dot com> <5321C8FA dot 40708 at gmail dot com> <5321CE1A dot 20509 at redhat dot com> <20140313235347 dot GD3384 at bubble dot grove dot modra dot org> <A78C989F6D9628469189715575E55B230AAB6B17 at IRSMSX103 dot ger dot corp dot intel dot com> <20140318230939 dot GA9145 at bubble dot grove dot modra dot org> <A78C989F6D9628469189715575E55B230AAB701F at IRSMSX103 dot ger dot corp dot intel dot com> <20140320015950 dot GB13347 at bubble dot grove dot modra dot org> <532C60CA dot 6090008 at redhat dot com>
> -----Original Message-----
> From: Pedro Alves [mailto:palves@redhat.com]
> Sent: Friday, March 21, 2014 4:55 PM
> >> If we can't trust the image to contain everything that the ELF header
> >> describes, would it be safer to generate fake sections based on the
> >> program header? We already assume that the program header is
> >> contained in the image.
> >
> > Yes, you're correct that it is wrong to assume program headers are
> > loaded. Even worse, the in-memory image doesn't even need to contain
> > the ELF file header.
>
> Yeah, and I was just assuming it didn't, hence my "just trust the
> headers" push before.
>
> I'm now thinking that we'll need pseudo-sections from program
> headers anyway, so I'd suggest going in that direction, leaving
> the add-symbol-file-from-memory command's intention generic,
> and leave revisiting how gdb retrieves the vdso itself off of
> memory for another day.
That would be something like the patch in one of the previous emails
in this thread: https://sourceware.org/ml/gdb/2014-03/msg00028.html,
wouldn't it?
Alan, would you be OK with this, as well?
Thanks,
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