# HG changeset patch # User "Yann E. MORIN" # Date 1282553220 -7200 # Node ID f27cfe7ed56d4469678606e7f4096b86d2dc00fc # Parent f9fcfc002c8a742b896c66cd26b67d405e3f17fb debug/gdb: use libexpat gdb can use libexpat to parse target memory descriptions, among other things. See: http://sourceware.org/ml/crossgcc/2010-08/msg00168.html Signed-off-by: "Yann E. MORIN" diff -r f9fcfc002c8a -r f27cfe7ed56d scripts/build/debug/300-gdb.sh --- a/scripts/build/debug/300-gdb.sh Mon Aug 23 14:32:16 2010 +0200 +++ b/scripts/build/debug/300-gdb.sh Mon Aug 23 10:47:00 2010 +0200 @@ -6,9 +6,13 @@ # config options for this. CT_DEBUG_GDB_NCURSES_VERSION="5.7" +# Ditto for the expat library +CT_DEBUG_GDB_EXPAT_VERSION="2.0.1" + do_debug_gdb_parts() { do_gdb= do_ncurses= + do_expat= if [ "${CT_GDB_CROSS}" = y ]; then do_gdb=y @@ -24,6 +28,7 @@ if [ "${CT_MINGW32}" != "y" ]; then do_ncurses=y fi + do_expat=y fi } @@ -41,6 +46,11 @@ {ftp,http}://ftp.gnu.org/pub/gnu/ncurses \ ftp://invisible-island.net/ncurses fi + + if [ "${do_expat}" = "y" ]; then + CT_GetFile "expat-${CT_DEBUG_GDB_EXPAT_VERSION}" .tar.gz \ + http://mesh.dl.sourceforge.net/sourceforge/expat/expat/${CT_DEBUG_GDB_EXPAT_VERSION} + fi } do_debug_gdb_extract() { @@ -55,6 +65,11 @@ CT_Extract "ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}" CT_Patch "ncurses" "${CT_DEBUG_GDB_NCURSES_VERSION}" fi + + if [ "${do_expat}" = "y" ]; then + CT_Extract "expat-${CT_DEBUG_GDB_EXPAT_VERSION}" + CT_Patch "expat" "${CT_DEBUG_GDB_EXPAT_VERSION}" + fi } do_debug_gdb_build() { @@ -190,6 +205,27 @@ gdb_native_CFLAGS+=("-L${CT_BUILD_DIR}/static-target/lib") fi # do_ncurses + if [ "${do_expat}" = "y" ]; then + CT_DoLog EXTRA "Building static target expat" + + mkdir -p "${CT_BUILD_DIR}/expat-build" + cd "${CT_BUILD_DIR}/expat-build" + + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/expat-${CT_DEBUG_GDB_EXPAT_VERSION}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_TARGET} \ + --prefix="${CT_BUILD_DIR}/static-target" \ + --enable-static \ + --disable-shared + + CT_DoExecLog ALL make ${PARALLELMFLAGS} + CT_DoExecLog ALL make install + + native_extra_config+=("--with-expat") + native_extra_config+=("--with-libexpat-prefix=${CT_BUILD_DIR}/static-target") + fi # do_expat + CT_DoLog EXTRA "Configuring native gdb" mkdir -p "${CT_BUILD_DIR}/build-gdb-native"