From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10549 invoked by alias); 11 Apr 2010 16:50:30 -0000 Received: (qmail 10541 invoked by uid 22791); 11 Apr 2010 16:50:29 -0000 X-SWARE-Spam-Status: No, hits=2.1 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,URIBL_BLACK X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 11 Apr 2010 16:50:24 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id o3BGo1su028719; Sun, 11 Apr 2010 18:50:01 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id o3BGnx9J015256; Sun, 11 Apr 2010 18:49:59 +0200 (CEST) Date: Sun, 11 Apr 2010 16:50:00 -0000 Message-Id: <201004111649.o3BGnx9J015256@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: hjl.tools@gmail.com CC: gdb-patches@sourceware.org, jan.kratochvil@redhat.com In-reply-to: <20100410222742.GA9901@intel.com> (hongjiu.lu@intel.com) Subject: Re: PATCH: PR corefiles/11467: amd64 gdb generates corrupted 32bit core file References: <20100410221943.GA9675@intel.com> <20100410222742.GA9901@intel.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00329.txt.bz2 > Date: Sat, 10 Apr 2010 15:27:42 -0700 > From: "H.J. Lu" > > 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 > > > > 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 > > Jan Kratochvil > > > > * 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.