aboutsummaryrefslogtreecommitdiff
path: root/gdb/features/Makefile
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-10-15 19:19:18 +0000
committerDaniel Jacobowitz <drow@false.org>2007-10-15 19:19:18 +0000
commit81adfcedc899da6e7641d2c2d6aad68f60d97735 (patch)
treee1137ec77293084d14043866ea01c9ad0badf798 /gdb/features/Makefile
parentd5d7db8e2faa95d6265cadc66bb0788ee922d9b1 (diff)
downloadgdb-81adfcedc899da6e7641d2c2d6aad68f60d97735.zip
gdb-81adfcedc899da6e7641d2c2d6aad68f60d97735.tar.gz
gdb-81adfcedc899da6e7641d2c2d6aad68f60d97735.tar.bz2
* target-descriptions.c (tdesc_predefined_types): New.
(tdesc_named_type): Use it. (tdesc_type_id, maint_print_c_tdesc_cmd): New functions. (_intialize_target_descriptions): Register "maint print c-tdesc". * features/Makefile (XMLTOC, CFILES, GDB): New macros. (cfiles, %.c): New rules. * features/arm-with-iwmmxt.c, features/mips-linux.c, features/mips64-linux.c: New generated files. * arm-linux-nat.c: Include preparsed description instead of "xml-support.h". (super_xfer_partial, arm_linux_xfer_partial): Remove. (arm_linux_read_description): New function. (_initialize_arm_linux_nat): Set to_read_description instead of to_xfer_partial. Initialize preparsed description. * config/arm/linux.mh (TDEP_XML): Delete. * mips-linux-nat.c: Include preparsed descriptions instead of "xml-support.h". (super_xfer_partial, mips_linux_xfer_partial): Remove. (mips_linux_read_description): New function. (_initialize_mips_linux_nat): Set to_read_description instead of to_xfer_partial. Initialize preparsed description. * config/mips/linux.mh (TDEP_XML): Delete. * Makefile.in (XMLFILES): Remove $(TDEP_XML). (features_headers, arm_with_iwmmxt_c, mips_linux_c) (mips64_linux_c): New macros. (arm-linux-nat.o, mips-linux-nat.o): Update. * gdb.texinfo (Maintenance Commands): Document "maint print c-tdesc".
Diffstat (limited to 'gdb/features/Makefile')
-rw-r--r--gdb/features/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/features/Makefile b/gdb/features/Makefile
index e116266..b81c1b8 100644
--- a/gdb/features/Makefile
+++ b/gdb/features/Makefile
@@ -25,6 +25,12 @@
# affected XML files is changed, and the results should be kept in the
# GDB repository.
+# It can also update the C files in the features directory from their
+# XML master copies. This relies on a GDB linked with expat and
+# configured for the correct architecture, so the files are again kept
+# in the GDB repository. To generate C files:
+# make GDB=/path/to/gdb XMLTOC="xml files" cfiles
+
WHICH = arm-with-iwmmxt mips-linux mips64-linux
# Record which registers should be sent to GDB by default after stop.
@@ -36,6 +42,10 @@ XSLTPROC = xsltproc
outdir = ../regformats
OUTPUTS = $(patsubst %,$(outdir)/%.dat,$(WHICH))
+XMLTOC =
+CFILES = $(patsubst %.xml,%.c,$(XMLTOC))
+GDB = false
+
all: $(OUTPUTS)
$(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl
@@ -47,5 +57,11 @@ $(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl
$(XSLTPROC) gdbserver-regs.xsl - >> $(outdir)/$*.tmp
sh ../../move-if-change $(outdir)/$*.tmp $(outdir)/$*.dat
+cfiles: $(CFILES)
+%.c: %.xml
+ $(GDB) -nx -q -batch \
+ -ex "set tdesc filename $<" -ex 'maint print c-tdesc' > $@.tmp
+ sh ../../move-if-change $@.tmp $@
+
# Other dependencies.
$(outdir)/arm-with-iwmmxt.dat: arm-core.xml xscale-iwmmxt.xml