From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21384 invoked by alias); 13 Apr 2010 17:39:36 -0000 Received: (qmail 21376 invoked by uid 22791); 13 Apr 2010 17:39:36 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45 X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Apr 2010 17:39:27 +0000 Received: by vws14 with SMTP id 14so902896vws.0 for ; Tue, 13 Apr 2010 10:39:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.44.198 with HTTP; Tue, 13 Apr 2010 10:39:24 -0700 (PDT) In-Reply-To: <201004131726.o3DHQcQI025209@glazunov.sibelius.xs4all.nl> References: <20100410221943.GA9675@intel.com> <20100410222742.GA9901@intel.com> <20100411000053.GA12675@intel.com> <20100411205250.GA24158@intel.com> <20100412132225.GA5932@intel.com> <20100413171757.GA6387@intel.com> <201004131726.o3DHQcQI025209@glazunov.sibelius.xs4all.nl> Date: Tue, 13 Apr 2010 17:39:00 -0000 Received: by 10.220.107.94 with SMTP id a30mr3245771vcp.135.1271180365009; Tue, 13 Apr 2010 10:39:25 -0700 (PDT) Message-ID: Subject: Re: PATCH: PR corefiles/11467: amd64 gdb generates corrupted 32bit core file From: "H.J. Lu" To: Mark Kettenis Cc: gdb-patches@sourceware.org, jan.kratochvil@redhat.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg00416.txt.bz2 On Tue, Apr 13, 2010 at 10:26 AM, Mark Kettenis w= rote: >> Date: Tue, 13 Apr 2010 10:17:57 -0700 >> From: "H.J. Lu" >> >> On Mon, Apr 12, 2010 at 06:22:25AM -0700, H.J. Lu wrote: >> > On Sun, Apr 11, 2010 at 01:52:50PM -0700, H.J. Lu wrote: >> > > Hi, >> > > >> > > Thanks for Mark's pointer. Solution is very simple. We just need to >> > > make sure that we call the right fill_gregset for 32bit executable >> > > on both Linux/x86-64 and Linux/i386. =A0OK to install? >> > > >> > > Thanks. >> > > >> > > >> > >> > Small update to use tdep->gregset_reg_offset instead of >> > i386_linux_gregset_reg_offset. =A0OK to install? >> > >> >> >> Here is the updated patch. It calls set_gdbarch_regset_from_core_section >> with i386_linux_regset_from_core_section. =A0OK to install? > > > Sorry, no. =A0You're adding far too much bloat. > Can you be more specific? I added i386_linux_supply_gregset, i386_linux_collect_gregset and i386_linux_regset_from_core_section because the the size check on general purpose registers: if (strcmp (sect_name, ".reg") =3D=3D 0 && sect_size =3D=3D tdep->sizeof_gr= egset) and gdb_assert (len =3D=3D tdep->sizeof_gregset); They are always false on Linux. I suspect that they are also false on most other x86 OSes. But I can't verify it. If it can be removed, many changes in my patch wont' be needed. Thanks. --=20 H.J.