summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-08-23 08:47:00 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-08-23 08:47:00 (GMT)
commit0622671d268baa7ab9ace8d4ccd3d0e58c9f761b (patch)
tree133451a8ba9b824ade54f20ed634ad2ebe5486fd /scripts
parent7a70e935c64a9bf7e0eacf11b0b0dfaeaf570e96 (diff)
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" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/debug/300-gdb.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index 2abd3ce..a8229d4 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -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 @@ do_debug_gdb_parts() {
if [ "${CT_MINGW32}" != "y" ]; then
do_ncurses=y
fi
+ do_expat=y
fi
}
@@ -41,6 +46,11 @@ do_debug_gdb_get() {
{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 @@ do_debug_gdb_extract() {
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 @@ do_debug_gdb_build() {
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"