From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26721 invoked by alias); 7 Feb 2010 21:50:40 -0000 Received: (qmail 26713 invoked by uid 22791); 7 Feb 2010 21:50:39 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ey-out-1920.google.com (HELO ey-out-1920.google.com) (74.125.78.148) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 07 Feb 2010 21:50:35 +0000 Received: by ey-out-1920.google.com with SMTP id 26so1190712eyw.42 for ; Sun, 07 Feb 2010 13:50:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.85.73 with SMTP id t51mr50571wee.155.1265579432834; Sun, 07 Feb 2010 13:50:32 -0800 (PST) In-Reply-To: <201002072129.o17LTOia028451@glazunov.sibelius.xs4all.nl> References: <20100204235952.GA27284@lucon.org> <20100205000052.GA27361@lucon.org> <201002072129.o17LTOia028451@glazunov.sibelius.xs4all.nl> Date: Sun, 07 Feb 2010 21:50:00 -0000 Message-ID: <6dc9ffc81002071350t74e2b3abm39b798ce26192254@mail.gmail.com> Subject: Re: PATCH: Add x86 xml files 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-02/txt/msg00186.txt.bz2 On Sun, Feb 7, 2010 at 1:29 PM, Mark Kettenis wro= te: >> Date: Thu, 4 Feb 2010 16:00:52 -0800 >> From: "H.J. Lu" >> >> On Thu, Feb 04, 2010 at 03:59:52PM -0800, H.J. Lu wrote: >> > Hi, >> > >> > Here is the first patch to move x86 targets to xml. They aren't used >> > until the rest of x86 xml support is checked in. >> > >> > OK to install? >> > >> > Thanks. >> > >> > >> > H.J. >> > --- >> > 2010-02-04 =A0H.J. Lu =A0 >> > >> > =A0 =A0 * features/Makefile (WHICH): Add i386/i386, i386/i386-linux, >> > =A0 =A0 i386/x86-64 and i386/x86-64-linux. >> > =A0 =A0 (i386/i386-expedite): New. >> > =A0 =A0 (i386/i386-linux-expedite): Likewise. >> > =A0 =A0 (i386/x86-64-expedite):Likewise. >> > =A0 =A0 (i386/x86-64-linux-expedite): Likewise. >> > =A0 =A0 (I386-XMLTOC): Likewise. >> > =A0 =A0 (I386-CFILES): Likewise. >> > =A0 =A0 (i386-cfiles): Likewise. >> > =A0 =A0 ($(outdir)/i386/i386.dat): New dependency. >> > =A0 =A0 ($(outdir)/i386/i386-linux.dat): Likewise. >> > =A0 =A0 ($(outdir)/i386/x86-64.dat): Likewise. >> > =A0 =A0 ($(outdir)/i386/x86-64-linux.dat): Likewise. >> > >> > =A0 =A0 * features/i386/32bit-core.xml: New. >> > =A0 =A0 * features/i386/32bit-linux.xml: Likewise. >> > =A0 =A0 * features/i386/32bit-sse.xml: Likewise. >> > =A0 =A0 * features/i386/64bit-core.xml: Likewise. >> > =A0 =A0 * features/i386/64bit-linux.xml: Likewise. >> > =A0 =A0 * features/i386/64bit-sse.xml: Likewise. >> > =A0 =A0 * features/i386/i386-linux.xml: Likewise. >> > =A0 =A0 * features/i386/i386.xml: Likewise. >> > =A0 =A0 * features/i386/x86-64-linux.xml: Likewise. >> > =A0 =A0 * features/i386/x86-64.xml: Likewise. >> > =A0 =A0 * features/i386/i386-linux.c: Likewise. >> > =A0 =A0 * features/i386/i386.c: Likewise. >> > =A0 =A0 * features/i386/x86-64-linux.c: Likewise. >> > =A0 =A0 * features/i386/x86-64.c: Likewise. >> >> Here is the patch. >> >> >> H.J. >> --- >> diff --git a/gdb/features/Makefile b/gdb/features/Makefile >> index 8aa553e..c54df74 100644 >> --- a/gdb/features/Makefile >> +++ b/gdb/features/Makefile >> @@ -31,6 +31,8 @@ >> =A0# =A0 make GDB=3D/path/to/gdb XMLTOC=3D"xml files" cfiles >> >> =A0WHICH =3D arm-with-iwmmxt arm-with-vfpv2 arm-with-vfpv3 arm-with-neon= \ >> + =A0 =A0 i386/i386 i386/i386-linux \ >> + =A0 =A0 i386/x86-64 i386/x86-64-linux \ >> =A0 =A0 =A0 mips-linux mips64-linux \ >> =A0 =A0 =A0 rs6000/powerpc-32l rs6000/powerpc-altivec32l rs6000/powerpc-= e500l \ >> =A0 =A0 =A0 rs6000/powerpc-64l rs6000/powerpc-altivec64l rs6000/powerpc-= vsx32l \ >> @@ -39,6 +41,10 @@ WHICH =3D arm-with-iwmmxt arm-with-vfpv2 arm-with-vfp= v3 arm-with-neon \ >> >> =A0# Record which registers should be sent to GDB by default after stop. >> =A0arm-expedite =3D r11,sp,pc >> +i386/i386-expedite =3D ebp,esp,eip >> +i386/i386-linux-expedite =3D ebp,esp,eip >> +i386/x86-64-expedite =3D rbp,rsp,rip >> +i386/x86-64-linux-expedite =3D rbp,rsp,rip >> =A0mips-expedite =3D r29,pc >> =A0mips64-expedite =3D r29,pc >> =A0powerpc-expedite =3D r1,pc >> @@ -57,6 +63,9 @@ XMLTOC =3D >> =A0CFILES =3D $(patsubst %.xml,%.c,$(XMLTOC)) >> =A0GDB =3D false >> >> +I386-XMLTOC =3D $(addsuffix .xml, $(filter i386/%, $(WHICH))) >> +I386-CFILES =3D $(patsubst %.xml,%.c,$(I386-XMLTOC)) > > Why are you introducing these variables? They are used by the new "i386-cfiles" target. >> =A0all: $(OUTPUTS) >> >> =A0$(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.x= sl >> @@ -71,6 +80,8 @@ $(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl g= dbserver-regs.xsl >> =A0 =A0 =A0 sh ../../move-if-change $(outdir)/$*.tmp $(outdir)/$*.dat >> >> =A0cfiles: $(CFILES) >> +i386-cfiles: $(I386-CFILES) > > And this target? You need a working gdb for your target with XML support to generate those C files for gdbserver. That is why XMLTOC is empty and GDB is false. To generate those C files, you have to do # make cfiles GDB=3D"your new GDB" XMLTOC=3D"your XML files" I added this target so that I can do # make i386-cfiles GDB=3D"my new GDB" to generate i386 C files for gdbserver without specifying XMLTOC at command line. It is very convenience for maintenance. > Otherwise this diff looks reasonable to me. =A0However, I think it would > be good if Daniel had a look at this as well; I'm not too familiar > with the target description framework, and I think XML is a > consipiracy by the computer industry to make people buy more hardware > ;). > Thanks. --=20 H.J.