From: "H.J. Lu" <hjl.tools@gmail.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: PATCH: Add x86 xml files
Date: Sun, 07 Feb 2010 21:50:00 -0000 [thread overview]
Message-ID: <6dc9ffc81002071350t74e2b3abm39b798ce26192254@mail.gmail.com> (raw)
In-Reply-To: <201002072129.o17LTOia028451@glazunov.sibelius.xs4all.nl>
On Sun, Feb 7, 2010 at 1:29 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> Date: Thu, 4 Feb 2010 16:00:52 -0800
>> From: "H.J. Lu" <hongjiu.lu@intel.com>
>>
>> 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 H.J. Lu <hongjiu.lu@intel.com>
>> >
>> > * features/Makefile (WHICH): Add i386/i386, i386/i386-linux,
>> > i386/x86-64 and i386/x86-64-linux.
>> > (i386/i386-expedite): New.
>> > (i386/i386-linux-expedite): Likewise.
>> > (i386/x86-64-expedite):Likewise.
>> > (i386/x86-64-linux-expedite): Likewise.
>> > (I386-XMLTOC): Likewise.
>> > (I386-CFILES): Likewise.
>> > (i386-cfiles): Likewise.
>> > ($(outdir)/i386/i386.dat): New dependency.
>> > ($(outdir)/i386/i386-linux.dat): Likewise.
>> > ($(outdir)/i386/x86-64.dat): Likewise.
>> > ($(outdir)/i386/x86-64-linux.dat): Likewise.
>> >
>> > * features/i386/32bit-core.xml: New.
>> > * features/i386/32bit-linux.xml: Likewise.
>> > * features/i386/32bit-sse.xml: Likewise.
>> > * features/i386/64bit-core.xml: Likewise.
>> > * features/i386/64bit-linux.xml: Likewise.
>> > * features/i386/64bit-sse.xml: Likewise.
>> > * features/i386/i386-linux.xml: Likewise.
>> > * features/i386/i386.xml: Likewise.
>> > * features/i386/x86-64-linux.xml: Likewise.
>> > * features/i386/x86-64.xml: Likewise.
>> > * features/i386/i386-linux.c: Likewise.
>> > * features/i386/i386.c: Likewise.
>> > * features/i386/x86-64-linux.c: Likewise.
>> > * 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 @@
>> # make GDB=/path/to/gdb XMLTOC="xml files" cfiles
>>
>> WHICH = arm-with-iwmmxt arm-with-vfpv2 arm-with-vfpv3 arm-with-neon \
>> + i386/i386 i386/i386-linux \
>> + i386/x86-64 i386/x86-64-linux \
>> mips-linux mips64-linux \
>> rs6000/powerpc-32l rs6000/powerpc-altivec32l rs6000/powerpc-e500l \
>> rs6000/powerpc-64l rs6000/powerpc-altivec64l rs6000/powerpc-vsx32l \
>> @@ -39,6 +41,10 @@ WHICH = arm-with-iwmmxt arm-with-vfpv2 arm-with-vfpv3 arm-with-neon \
>>
>> # Record which registers should be sent to GDB by default after stop.
>> arm-expedite = r11,sp,pc
>> +i386/i386-expedite = ebp,esp,eip
>> +i386/i386-linux-expedite = ebp,esp,eip
>> +i386/x86-64-expedite = rbp,rsp,rip
>> +i386/x86-64-linux-expedite = rbp,rsp,rip
>> mips-expedite = r29,pc
>> mips64-expedite = r29,pc
>> powerpc-expedite = r1,pc
>> @@ -57,6 +63,9 @@ XMLTOC =
>> CFILES = $(patsubst %.xml,%.c,$(XMLTOC))
>> GDB = false
>>
>> +I386-XMLTOC = $(addsuffix .xml, $(filter i386/%, $(WHICH)))
>> +I386-CFILES = $(patsubst %.xml,%.c,$(I386-XMLTOC))
>
> Why are you introducing these variables?
They are used by the new "i386-cfiles" target.
>> all: $(OUTPUTS)
>>
>> $(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl
>> @@ -71,6 +80,8 @@ $(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl
>> sh ../../move-if-change $(outdir)/$*.tmp $(outdir)/$*.dat
>>
>> cfiles: $(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="your new GDB" XMLTOC="your XML files"
I added this target so that I can do
# make i386-cfiles GDB="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. However, 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.
--
H.J.
next prev parent reply other threads:[~2010-02-07 21:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-05 0:01 H.J. Lu
2010-02-05 0:01 ` H.J. Lu
2010-02-07 21:29 ` Mark Kettenis
2010-02-07 21:50 ` H.J. Lu [this message]
2010-02-07 22:43 ` Mark Kettenis
2010-02-07 21:50 ` Daniel Jacobowitz
2010-02-07 21:55 ` H.J. Lu
2010-02-07 22:23 ` Daniel Jacobowitz
2010-02-07 22:36 ` Mark Kettenis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6dc9ffc81002071350t74e2b3abm39b798ce26192254@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox