This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Add expat to the GDB sources
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Tue, 18 Jul 2006 09:57:18 -0400
- Subject: Re: [RFC] Add expat to the GDB sources
- References: <20060718134048.GA15685@nevyn.them.org>
On Tue, Jul 18, 2006 at 09:40:48AM -0400, Daniel Jacobowitz wrote:
> At the beginning of the year, I proposed adding an XML parsing library to
> GDB. There was some discussion, and a few alternatives were proposed which
> would accomplish the same goals, but neither substantially better nor
> substantially worse. Since then, we've fleshed out the project the XML
> descriptions were originally intended for (targets which can inform the
> debugger about their registers), and added another (memory maps, used to
> control flash writing).
>
> I chose expat as the C XML library to use in GDB. It's a bit frustrating
> (it's a stream-oriented binding, and I find DOM (tree-oriented) bindings
> much more natural), but it's also useful and of a reasonable size. The most
> logical candidate for a DOM binding would have been libxml2, and the source
> for that is excessive to include in GDB.
>
> Here is a patch to add an expat directory to the src repository, gdb builds,
> and gdb release tarballs. Not shown is expat itself.
>
> Any comments? I will hold off on this patch for a little while, at least
> until one of the expat clients is ready.
D'oh! With patch now.
--
Daniel Jacobowitz
CodeSourcery
2006-07-18 Daniel Jacobowitz <dan@codesourcery.com>
* expat: New directory.
* Makefile.def (host_modules, dependencies): Add expat.
* configure.in (host_libs): Add expat.
* src-release (GDB_SUPPORT_DIRS): Add expat.
* MAINTAINERS: Mention expat.
* Makefile.in, configure: Regenerated.
2006-07-18 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (EXPAT, EXPAT_CFLAGS): New.
(INTERNAL_CFLAGS_BASE, CLIBS, CDEPS, LINTFLAGS): Add expat.
Index: Makefile.def
===================================================================
RCS file: /cvs/src/src/Makefile.def,v
retrieving revision 1.69
diff -u -p -r1.69 Makefile.def
--- Makefile.def 7 Jun 2006 22:33:16 -0000 1.69
+++ Makefile.def 18 Jul 2006 13:13:51 -0000
@@ -47,6 +47,8 @@ host_modules= { module= dejagnu; };
host_modules= { module= diff; };
host_modules= { module= dosutils; no_check= true; };
host_modules= { module= etc; };
+host_modules= { module= expat; no_install= true;
+ extra_configure_flags='--disable-shared'; };
host_modules= { module= fastjar; no_check_cross= true; };
host_modules= { module= fileutils; };
host_modules= { module= findutils; };
@@ -304,6 +306,7 @@ dependencies = { module=all-gdb; on=all-
dependencies = { module=all-gdb; on=all-build-bison; };
dependencies = { module=all-gdb; on=all-build-byacc; };
dependencies = { module=all-gdb; on=all-sim; };
+dependencies = { module=all-gdb; on=all-expat; };
dependencies = { module=configure-libgui; on=configure-tcl; };
dependencies = { module=configure-libgui; on=configure-tk; };
Index: configure.in
===================================================================
RCS file: /cvs/src/src/configure.in,v
retrieving revision 1.313
diff -u -p -r1.313 configure.in
--- configure.in 3 Jul 2006 11:22:03 -0000 1.313
+++ configure.in 18 Jul 2006 13:13:55 -0000
@@ -123,7 +123,7 @@ build_tools="build-texinfo build-byacc b
# these libraries are used by various programs built for the host environment
#
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber expat"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
Index: src-release
===================================================================
RCS file: /cvs/src/src/src-release,v
retrieving revision 1.21
diff -u -p -r1.21 src-release
--- src-release 31 May 2006 15:14:34 -0000 1.21
+++ src-release 18 Jul 2006 13:13:55 -0000
@@ -270,7 +270,7 @@ gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_S
SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
.PHONY: gdb.tar.bz2
-GDB_SUPPORT_DIRS= bfd include libiberty opcodes readline sim intl
+GDB_SUPPORT_DIRS= bfd include libiberty opcodes readline sim intl expat
gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
$(MAKE) -f $(SELF) gdb-taz TOOL=gdb \
MD5PROG="$(MD5PROG)" \
Index: gdb/Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.827
diff -u -p -r1.827 Makefile.in
--- gdb/Makefile.in 12 Jul 2006 20:46:32 -0000 1.827
+++ gdb/Makefile.in 18 Jul 2006 13:13:56 -0000
@@ -128,6 +128,10 @@ READLINE = $(READLINE_DIR)/libreadline.a
READLINE_SRC = $(srcdir)/$(READLINE_DIR)
READLINE_CFLAGS = -I$(READLINE_SRC)/..
+# Where is the expat library? Typically in ../expat.
+EXPAT = ../expat/.libs/libexpat.a
+EXPAT_CFLAGS = -I$(srcdir)/../expat/lib -I../expat
+
WARN_CFLAGS = @WARN_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
GDB_WARN_CFLAGS = $(WARN_CFLAGS)
@@ -348,7 +352,7 @@ CXXFLAGS = -g -O
INTERNAL_CFLAGS_BASE = \
$(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
- $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \
+ $(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(EXPAT_CFLAGS) \
$(INTL_CFLAGS) $(ENABLE_CFLAGS)
INTERNAL_WARN_CFLAGS = $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS)
INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
@@ -376,10 +380,10 @@ INSTALLED_LIBS=-lbfd -lreadline -lopcode
-lintl -liberty
CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(INTL) $(LIBIBERTY) \
$(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
- $(LIBICONV) \
+ $(LIBICONV) $(EXPAT) \
$(LIBIBERTY) $(WIN32LIBS)
CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
- $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS)
+ $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(EXPAT)
ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
@@ -389,7 +393,7 @@ DIST=gdb
LINT=/usr/5bin/lint
LINTFLAGS= $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
$(BFD_CFLAGS) $(INCLUDE_CFLAGS) \
- $(INTL_CFLAGS)
+ $(INTL_CFLAGS) $(EXPAT_CFLAGS)
RUNTEST = runtest
RUNTESTFLAGS=
Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/MAINTAINERS,v
retrieving revision 1.32
diff -u -p -r1.32 MAINTAINERS
--- MAINTAINERS 22 May 2006 15:30:13 -0000 1.32
+++ MAINTAINERS 18 Jul 2006 13:20:07 -0000
@@ -39,7 +39,7 @@ config.guess; config.sub; readline/suppo
depcomp
Send bug reports and patches to bug-automake@gnu.org.
-gdb/; readline/; sim/; GDB's part of include/
+gdb/; readline/; sim/; expat/; GDB's part of include/
GDB: http://www.gnu.org/software/gdb/
Patches to gdb-patches@sources.redhat.com.
See also gdb/MAINTAINERS and sim/MAINTAINERS.