From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27094 invoked by alias); 7 Apr 2010 17:35:56 -0000 Received: (qmail 27084 invoked by uid 22791); 7 Apr 2010 17:35:55 -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; Wed, 07 Apr 2010 17:35:50 +0000 Received: by vws14 with SMTP id 14so692184vws.0 for ; Wed, 07 Apr 2010 10:35:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.44.198 with HTTP; Wed, 7 Apr 2010 10:35:48 -0700 (PDT) In-Reply-To: References: <1242886820451223367@unknownmsgid> Date: Wed, 07 Apr 2010 17:35:00 -0000 Received: by 10.220.107.161 with SMTP id b33mr4499783vcp.113.1270661748588; Wed, 07 Apr 2010 10:35:48 -0700 (PDT) Message-ID: Subject: Re: [RFC] Fix for Go32-v2 native woes From: "H.J. Lu" To: Pierre Muller 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/msg00142.txt.bz2 On Tue, Apr 6, 2010 at 11:32 PM, H.J. Lu wrote: > On Tue, Apr 6, 2010 at 7:15 AM, Pierre Muller > wrote: >> =A0In an email to gdb list, >> I complained about go32 native GDB giving internal errors... >> >> =A0The problem is that some code in i386-tdep.c is not compatible >> with a target that supports no SSE registers. >> >> =A0I finally managed to find a fix, but it is not straightforward: >> =A0I had to add a new xml file in features/i386 directory >> specific for go32v2 target, that does not read i386-sse.xml. >> =A0I had to adapt the code in i386-tdep.c to support >> missing feature_vector and to set tdesc to >> tdesc_i386_go32v2 instead of tdesc_i386 when go32v2 >> osabi was detected. >> >> =A0This allows me to use CVS GDB on DJGPP again. >> >> =A0I checked with a testsuite run on gcc-farm that nothing changed >> for at least that other target (amd64-linux). >> >> =A0Similar fixes might be required for other 'old' >> i386 targets that do not support SSE registers. >> >> =A0Comments welcome as usual! >> >> Pierre Muller >> Pascal language support maintainer for GDB >> >> >> >> 2010-04-06 =A0Pierre Muller =A0 >> >> =A0 =A0 =A0 =A0* i386-tdep.c: Add include features/i386/i386-go32v2.c. >> =A0 =A0 =A0 =A0(i386_go32_init_abi): Set TDESC field to TDESC_I386_GO32V= 2. >> =A0 =A0 =A0 =A0(i386_validate_tdesc_p): Do not require FEATURE_VECTOR. >> =A0 =A0 =A0 =A0Adapt code accordingly. >> =A0 =A0 =A0 =A0(i386_gdbarch_init): Set TDESC to TDESC_I386_GO32V2 if >> =A0 =A0 =A0 =A0os abi is GDB_OSABI_GO32V2. >> =A0 =A0 =A0 =A0(_initialize_i386_tdep): Call initialize_tdes_i386_go32v2= function. >> >> =A0 =A0 =A0 =A0* features/Makefile (WHICH): Add new i386/i386-go32v2 ent= ry. >> =A0 =A0 =A0 =A0* features/i386/i386-go32v2.xml: New file. Without SSE re= gsiters. >> =A0 =A0 =A0 =A0* features/i386/i386-go32v2.c: New generated file. >> =A0 =A0 =A0 =A0* regformats/i386/i386-go32v2.dat: New generated file. >> > > This patch is incorrect. Linux runs on 32bit x86 processors without SSE. > I have a patch to support it. > Please try hjl/mmx branch at http://git.kernel.org/?p=3Ddevel/gdb/hjl/avx.git;a=3Dsummary You need to return i386_mmx as target description if your target doesn't support SSE. Known issue: "gcore" doesn't work for i386 MMX targets and I have a patch. --=20 H.J.