[CT-NG 1.11.3] Cross-gdb XML support missing
Benoît THÉBAUDEAU
benoit.thebaudeau@advansee.com
Sat May 21 13:33:00 GMT 2011
Hi Yann, all,
If I build Linaro GDB as a crosstool with CT-NG 1.11.3, I get the following
warning when I run GDB:
"Can not parse XML target description; XML support was disabled at compile time"
This may also cause errors when accessing target registers.
I think that we should do something like the patch below to fix this (not yet
tested).
By the way, note that Linaro GCC 4.5/4.6 and GDB can now be bumped to revision
2011.05.
Best regards,
Benoît
--------------------------------------------------------------------------------
This patch adds XML support to cross-gdb so that the target description can be
parsed. This avoids possible runtime errors and the following GDB warning:
"Can not parse XML target description; XML support was disabled at compile time"
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
---
--- a/scripts/build/debug/300-gdb.sh Sat May 21 14:45:04 2011
+++ b/scripts/build/debug/300-gdb.sh Sat May 21 15:08:56 2011
@@ -16,6 +16,7 @@
if [ "${CT_GDB_CROSS}" = y ]; then
do_gdb=y
+ do_expat=y
fi
if [ "${CT_GDB_GDBSERVER}" = "y" ]; then
@@ -100,8 +101,34 @@
if [ "${CT_GDB_CROSS}" = "y" ]; then
local -a cross_extra_config
+ local -a gdb_cross_CFLAGS
CT_DoStep INFO "Installing cross-gdb"
+
+ if [ "${do_expat}" = "y" ]; then
+ CT_DoLog EXTRA "Building static host expat"
+
+ mkdir -p "${CT_BUILD_DIR}/host-expat-build"
+ cd "${CT_BUILD_DIR}/host-expat-build"
+
+ CT_DoExecLog CFG \
+ "${CT_SRC_DIR}/expat-${CT_DEBUG_GDB_EXPAT_VERSION}/configure" \
+ --build=${CT_BUILD} \
+ --host=${CT_HOST} \
+ --prefix="${CT_BUILD_DIR}/static-host" \
+ --enable-static \
+ --disable-shared
+
+ CT_DoExecLog ALL make ${JOBSFLAGS}
+ CT_DoExecLog ALL make install
+
+ cross_extra_config+=("--with-expat")
+ cross_extra_config+=("--with-libexpat-prefix=${CT_BUILD_DIR}/static-host")
+ # There's no better way to tell gdb where to find -lexpat... :-(
+ gdb_cross_CFLAGS+=("-I${CT_BUILD_DIR}/static-host/include")
+ gdb_cross_CFLAGS+=("-L${CT_BUILD_DIR}/static-host/lib")
+ fi # do_expat
+
CT_DoLog EXTRA "Configuring cross-gdb"
mkdir -p "${CT_BUILD_DIR}/build-gdb-cross"
@@ -127,6 +154,7 @@
CT_DoExecLog CFG \
CC="${CC_for_gdb}" \
LD="${LD_for_gdb}" \
+ CFLAGS="${gdb_cross_CFLAGS[*]}" \
"${gdb_cross_configure}" \
--build=${CT_BUILD} \
--host=${CT_HOST} \
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list