crosstool-ng/config/debug/gdb.in.gdbserver
Alexey Neyman 16d166c2c8 Force wide char support in uClibc if GDB8 is enabled
GDB8 (or rather gnulib that is a part of it) provides a fallback mbstate_t
definition - but GCC's C++ headers (which are used via stdint.h since GDB8
uses C++) provide another mbstate_t if libc does not have wide char support.
These two definitions conflict with each other.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-06-08 00:06:17 -07:00

64 lines
2.1 KiB
Plaintext

# Menu for the native gdbserver
config GDB_GDBSERVER
bool
prompt "gdbserver"
default y
depends on ! BARE_METAL
select LIBC_UCLIBC_WCHAR if LIBC_uClibc && GDB_8_0_or_later
help
Build and install a gdbserver for the target, to run on the target.
if GDB_GDBSERVER
config GDB_GDBSERVER_HAS_IPA_LIB
bool
depends on GDB_7_2_or_later
default y
# gdbserver is then linked with "-static -Wl,--dynamic-list=..." which
config GDB_GDBSERVER_STATIC
bool
prompt "Build a static gdbserver"
depends on EXPERIMENTAL
help
In case you have trouble with dynamic loading of shared libraries,
you will find that a static gdbserver comes in handy.
However, it has been noticed at least on x86 that enabling this
option produces an invalid gdbserver binary. It is linked with
"-static -Wl,--dynamic-list=..." which
# (a) requests invalid program interpreter
# (b) crashes glibc/uClibc-ng and does not work with musl
# See https://sourceware.org/ml/libc-alpha/2017-03/msg00267.html
It is possible it would work with other architectures, hence it is
not completely removed. Use with care and report to the mailing list
if the resulting gdbserver works.
For further details, see:
https://sourceware.org/bugzilla/show_bug.cgi?id=19617
https://sourceware.org/bugzilla/show_bug.cgi?id=21086
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
comment "In bare-metal, you'll need to "
comment "provide your own gdbserver stub."
endif # BARE_METAL