From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4791 invoked by alias); 9 Apr 2010 20:43:15 -0000 Received: (qmail 4781 invoked by uid 22791); 9 Apr 2010 20:43:14 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45,TW_AV 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; Fri, 09 Apr 2010 20:43:08 +0000 Received: by vws15 with SMTP id 15so432141vws.0 for ; Fri, 09 Apr 2010 13:43:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.44.198 with HTTP; Fri, 9 Apr 2010 13:43:06 -0700 (PDT) In-Reply-To: References: <20100409155012.GA19118@intel.com> <201004091559.o39FxnQi005865@glazunov.sibelius.xs4all.nl> <201004091915.o39JFfFN011160@glazunov.sibelius.xs4all.nl> Date: Fri, 09 Apr 2010 20:43:00 -0000 Received: by 10.220.62.9 with SMTP id v9mr300110vch.181.1270845786190; Fri, 09 Apr 2010 13:43:06 -0700 (PDT) Message-ID: Subject: Re: PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE From: "H.J. Lu" To: Mark Kettenis Cc: gdb-patches@sourceware.org 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/msg00283.txt.bz2 On Fri, Apr 9, 2010 at 1:08 PM, H.J. Lu wrote: > On Fri, Apr 9, 2010 at 12:15 PM, Mark Kettenis = wrote: >>> Date: Fri, 9 Apr 2010 09:01:01 -0700 >>> From: "H.J. Lu" >>> >>> On Fri, Apr 9, 2010 at 8:59 AM, Mark Kettenis = wrote: >>> >> Date: Fri, 9 Apr 2010 08:50:12 -0700 >>> >> From: "H.J. Lu" >>> >> >>> >> Hi, >>> >> >>> >> This patch fixes gcore by not generating core regset sections which >>> >> aren't supported by i386 without SSE. =A0OK to install? >>> > >>> > Sorry, I think this is the wrong way to fix this. >>> > >>> >>> Any suggestions? >> >> Yup. =A0This makes sure we always install a list of register notes that >> matches the target description. >> >> 2010-04-09 =A0Mark Kettenis =A0 >> >> =A0 =A0 =A0 =A0* i386-linux-tdep.c (i386_linux_regset_sections): Remove = extended >> =A0 =A0 =A0 =A0register note sections. >> =A0 =A0 =A0 =A0(i386_linux_sse_regset_sections, i386_linux_avx_regset_se= ctions): >> =A0 =A0 =A0 =A0New variables. >> =A0 =A0 =A0 =A0(i386_linux_init_abi): Install list of supported register= note >> =A0 =A0 =A0 =A0sections that matches the target description. >> > > That is nice. We should do the same thing in amd64-linux-tdep.c. > My second thought. No need to change amd64-linux-tdep.c. We can just add i386_linux_mmx_regset_sections. OK to install? Thanks. H.J. --- 2010-04-09 Mark Kettenis H.J. Lu * i386-linux-tdep.c (i386_linux_mmx_regset_sections): New variable. (i386_linux_init_abi): Call set_gdbarch_core_regset_sections with i386_linux_mmx_regset_sections if SSE isn't available. diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 72aced5..3fc7ef0 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -54,6 +54,13 @@ #include "features/i386/i386-avx-linux.c" /* Supported register note sections. */ +static struct core_regset_section i386_linux_mmx_regset_sections[] =3D +{ + { ".reg", 144, "general-purpose" }, + { ".reg2", 108, "floating-point" }, + { NULL, 0 } +}; + static struct core_regset_section i386_linux_regset_sections[] =3D { { ".reg", 144, "general-purpose" }, @@ -862,7 +869,12 @@ i386_linux_init_abi (struct gdbarch_info info, struct = gdbar ch *gdbarch) svr4_fetch_objfile_link_map); /* Install supported register note sections. */ - set_gdbarch_core_regset_sections (gdbarch, i386_linux_regset_sections); + if (tdesc_find_feature (tdesc, "org.gnu.gdb.i386.sse")) + set_gdbarch_core_regset_sections (gdbarch, + i386_linux_regset_sections); + else + set_gdbarch_core_regset_sections (gdbarch, + i386_linux_mmx_regset_sections); set_gdbarch_core_read_description (gdbarch, i386_linux_core_read_description); --=20 H.J.