# HG changeset patch # User "Yann E. MORIN" # Date 1337270187 -7200 # Node ID c301df1af7cb78d0f00274336d6a9516cbb19fd3 # Parent 2c13e5ce38fd60c30d6e0028f52f7f5c6b243aaf debug/gdb: add option to enable/disable the IPA lib for gdbserver gdbserver >= 7.2 comes with an optional library to use tracepoints, the In Process Agent (IPA) library, libinproctrace.so. Currently, we build gdbserver staticaly, but that breaks the build of the IPA lib. Add an option to biuld the IPA lib, but not if statically linking. Reported-by: Thomas Petazzoni Signed-off-by: "Yann E. MORIN" diff -r 2c13e5ce38fd -r c301df1af7cb config/debug/gdb.in.gdbserver --- a/config/debug/gdb.in.gdbserver Thu May 17 18:07:28 2012 +0200 +++ b/config/debug/gdb.in.gdbserver Thu May 17 17:56:27 2012 +0200 @@ -9,6 +9,11 @@ if GDB_GDBSERVER +config GDB_GDBSERVER_HAS_IPA_LIB + bool + depends on GDB_7_2_or_later + default y + config GDB_GDBSERVER_STATIC bool prompt "Build a static gdbserver" @@ -17,6 +22,21 @@ In case you have trouble with dynamic loading of shared libraries, you will find that a static gdbserver comes in handy. +config GDB_GDBSERVER_BUILD_IPA_LIB + bool + prompt "Build the IPA library" + depends on GDB_GDBSERVER_HAS_IPA_LIB && !GDB_GDBSERVER_STATIC + help + gdbserver >= 7.2 comes with an optional library to use tracepoints, + the In Process Agent (IPA) library, libinproctrace.so. + + Say 'y' if you indend to use tracepoints when debugging your + programs with gdbserver. + + Note: Currently, building this library is not possible when the + gdbserver is built statically. This is a limitation in + crosstool-NG, so do not bug upstream about it... + endif # GDB_GDBSERVER if BARE_METAL diff -r 2c13e5ce38fd -r c301df1af7cb scripts/build/debug/300-gdb.sh --- a/scripts/build/debug/300-gdb.sh Thu May 17 18:07:28 2012 +0200 +++ b/scripts/build/debug/300-gdb.sh Thu May 17 17:56:27 2012 +0200 @@ -369,6 +369,14 @@ gdbserver_extra_config=("${extra_config[@]}") + if [ "${CT_GDB_GDBSERVER_HAS_IPA_LIB}" = "y" ]; then + if [ "${CT_GDB_GDBSERVER_BUILD_IPA_LIB}" = "y" ]; then + gdbserver_extra_config+=( --enable-inprocess-agent ) + else + gdbserver_extra_config+=( --disable-inprocess-agent ) + fi + fi + CT_DoExecLog CFG \ LDFLAGS="${gdbserver_LDFLAGS}" \ "${gdb_src_dir}/gdb/gdbserver/configure" \