gdb: do not allow gdbserver/cross-gdb build in some cases

When an external toolchain is used, and the user has chosen to copy
the external toolchain gdbserver to the target, then we should allow
the user to build a gdbserver and/or a cross-gdb: the ones of the
external toolchain should be used.

The reasoning is that one must use a gdbserver and cross-gdb of
identical versions to be sure that debugging will work properly.

Change suggested by Yann E. Morin.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Thomas Petazzoni 2013-04-07 00:04:34 +00:00 committed by Peter Korsgaard
parent a0b6faaab4
commit f6d0246506
2 changed files with 10 additions and 1 deletions

View File

@ -3,7 +3,11 @@ comment "gdb/gdbserver require a toolchain with thread and thread debug support"
config BR2_PACKAGE_GDB
bool "gdb"
select BR2_PACKAGE_GDB_SERVER if !BR2_PACKAGE_GDB_DEBUGGER
# When the external toolchain gdbserver is copied to the
# target, we don't allow building a separate gdbserver. The
# one from the external toolchain should be used.
select BR2_PACKAGE_GDB_SERVER if \
(!BR2_PACKAGE_GDB_DEBUGGER && !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY)
depends on BR2_TOOLCHAIN_HAS_THREADS && BR2_TOOLCHAIN_HAS_THREADS_DEBUG
help
GDB, the GNU Project debugger, allows you to see what is
@ -25,6 +29,7 @@ if BR2_PACKAGE_GDB
config BR2_PACKAGE_GDB_SERVER
bool "gdbserver"
depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
help
Build the gdbserver stub to run on the target.
A full gdb is needed to debug the progam.

View File

@ -1,5 +1,9 @@
config BR2_PACKAGE_HOST_GDB
bool "Build cross gdb for the host"
# When the external toolchain gdbserver is used, we shouldn't
# allow to build a cross-gdb, as the one of the external
# toolchain should be used.
depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
help
Build a cross gdb that runs on the host machine and debugs
programs running on the target. It requires 'gdbserver'