This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: Add functions to write core notes for i386/amd64


> Date: Mon, 19 Apr 2010 09:20:11 -0700
> From: "H.J. Lu" <hjl.tools@gmail.com>
> 
> On Mon, Apr 19, 2010 at 9:03 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> > This adds the necessary backend functions to write proper core notes
> > like the ppc code already has. ?This is necessary for GDB to generate
> > proper 32-bit core dumps on 64-bit systems.
> > ok?
> >
> >
> > 2010-04-19 ?Mark Kettenis ?<kettenis@gnu.org>
> >
> > ? ? ? ?* elf64-x86-64.c (elf64_x86_64_write_core_note): New function.
> > ? ? ? ?(elf_backend_write_core_note): Define.
> > ? ? ? ?* elf32-i386.c (elf_i386_write_core_note): New function.
> > ? ? ? ?(elf_backend_write_core_note): Define.
> >
> 
> It is not OK. I am not sure if it will work for Linux since Linux has
> different note sizes.

Where do you think I tested this code?

> In any case, after
> 
> http://sourceware.org/ml/binutils/2010-04/msg00131.html
> 
> NT_PRPSINFO and NT_PRSTATUS should work fine on
> Linux/x86-64.

No, currently GDB writes out bogus notes for 32-bit core dumps on
Linux/amd64 systems.

> I think the proper way to fix it is to define PRPSINFO32_T and
> PRPSINFO32_T for your x86-64 hosts.

The long term plan in GDB is to make it possible to generate core
dumps even on non-native configurations.  In order to do that, it is
necessary to add these functions that write out the proper core notes
without depending on any host-specific header files.


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