gdb: enable tui support for target package
authorVincent Stehlé <vincent.stehle@laposte.net>
Mon, 15 Sep 2014 20:50:07 +0000 (22:50 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 16 Sep 2014 20:25:40 +0000 (22:25 +0200)
Add a configuration option to compile the gdb target package with the
--enable-tui switch.

This is done pretty much in the same way as in commit 2474fb0bf1a7 ("host-gdb:
enable terminal user interface support"), but for the gdb package on target.

This makes sense only when a full debugger is installed on target,
not for a gdbserver.

[Thomas: remove "default n" since this is the default, adjust the
prompt of the option, and rewrap the help text.]

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/gdb/Config.in
package/gdb/gdb.mk

index bfbc8d8bbab992b5fc34ce8622679f926bf958ee..9622948b48bb65b442679e84aed4d24d648abda9 100644 (file)
@@ -46,4 +46,20 @@ comment "full gdb on target needs a toolchain w/ wchar"
        depends on !BR2_sh && !BR2_sh64 && !BR2_avr32 && !BR2_microblaze && !BR2_bfin
        depends on !BR2_USE_WCHAR
 
+if BR2_PACKAGE_GDB_DEBUGGER
+
+config BR2_PACKAGE_GDB_TUI
+       bool "TUI support"
+       help
+         This option enables terminal user interface (TUI) for gdb
+
+         "The GDB Text User Interface (TUI) is a terminal interface
+         which uses the curses library to show the source file, the
+         assembly output, the program registers and GDB commands in
+         separate text windows."
+
+         https://sourceware.org/gdb/current/onlinedocs/gdb/TUI.html
+
+endif
+
 endif
index 41d3689c8376a896b3c2ce2908c696321b4ea967..4a194e26b098c09fdd94fa306a85c19a822024d4 100644 (file)
@@ -76,7 +76,6 @@ GDB_CONF_ENV = \
 
 GDB_CONF_OPT = \
        --without-uiout \
-       --disable-tui \
        --disable-gdbtk \
        --without-x \
        --disable-sim \
@@ -86,6 +85,12 @@ GDB_CONF_OPT = \
        --without-included-gettext \
        --disable-werror
 
+ifeq ($(BR2_PACKAGE_GDB_TUI),y)
+       GDB_CONF_OPT += --enable-tui
+else
+       GDB_CONF_OPT += --disable-tui
+endif
+
 # This removes some unneeded Python scripts and XML target description
 # files that are not useful for a normal usage of the debugger.
 define GDB_REMOVE_UNNEEDED_FILES