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: PR corefiles/11467: amd64 gdb generates corrupted 32bit core file


> Date: Sat, 10 Apr 2010 15:27:42 -0700
> From: "H.J. Lu" <hongjiu.lu@intel.com>
> 
> On Sat, Apr 10, 2010 at 03:19:43PM -0700, H.J. Lu wrote:
> > Hi,
> > 
> > I am checking in this patch to support 32bit core note sections on
> > Linux/x86-64. I will submit a separate gdb patch.
> > 
> > 
> > H.J.
> > ---
> > 2010-04-10  H.J. Lu  <hongjiu.lu@intel.com>
> > 
> > 	PR corefiles/11467
> > 	* configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h
> > 	for x86_64-*-linux*.
> > 	* config.in: Regenerated.
> > 	* configure: Likewise.
> > 
> > 	* elf.c: Include CORE_HEADER if it is defined.
> > 
> > 2010-04-10  H.J. Lu  <hongjiu.lu@intel.com>
> > 	    Jan Kratochvil  <jan.kratochvil@redhat.com>
> > 
> > 	* hosts/x86-64linux.h: New.
> 
> Hi,
> 
> Hi,
> 
> Here is the gdb patch to properly generate 32bit coredumps on
> Linux/x86-64. The key here is to use the right register offset
> for gcore. OK to install?

No, this is wrong.  This should all be handled by -tdep.c code.  The
gcore code in linux-nat.c nly falls back on the fetch_gregset() if for
some reason the gdbarch_regset_from_core_section() function doesn't
return a valid register set.  I don't immediately see why, but that is
what you need to fix.


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