diff options
author | Tom Tromey <tom@tromey.com> | 2019-12-02 16:12:19 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-12-02 16:12:19 -0700 |
commit | de2396d07844ca39a1893a11ead375acf2556890 (patch) | |
tree | 68152e8c591a286123ed15d49dec38d0dbe182fb | |
parent | 638d85bce02264cd6180a240a1d033fb1ea58e26 (diff) | |
download | gdb-de2396d07844ca39a1893a11ead375acf2556890.zip gdb-de2396d07844ca39a1893a11ead375acf2556890.tar.gz gdb-de2396d07844ca39a1893a11ead375acf2556890.tar.bz2 |
Fix build breakage with --disable-tui
An earlier patch introduced a unit test for tui_copy_source_line.
However if the TUI is not built (as is apparently the case on some of
the buildbot builders), then this will fail to link.
This patch fixes the problem. Tested by rebuilding with the TUI
disabled.
gdb/ChangeLog
2019-12-02 Tom Tromey <tom@tromey.com>
* unittests/tui-selftests.c (run_tests): Make conditional.
(_initialize_tui_selftest): Make conditional.
Change-Id: I964811c7635be24cf6c53920e74e920914503674
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/unittests/tui-selftests.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0c31ddd..59825d3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-12-02 Tom Tromey <tom@tromey.com> + + * unittests/tui-selftests.c (run_tests): Make conditional. + (_initialize_tui_selftest): Make conditional. + 2019-12-02 Christian Biesinger <cbiesinger@google.com> * aix-thread.c (debug_aix_thread): Change type to bool. diff --git a/gdb/unittests/tui-selftests.c b/gdb/unittests/tui-selftests.c index 3a5d34f..95c12e3 100644 --- a/gdb/unittests/tui-selftests.c +++ b/gdb/unittests/tui-selftests.c @@ -21,6 +21,8 @@ #include "gdbsupport/selftest.h" #include "tui/tui-winsource.h" +#ifdef TUI + namespace selftests { namespace tui { @@ -41,8 +43,12 @@ run_tests () } /* namespace tui*/ } /* namespace selftests */ +#endif /* TUI */ + void _initialize_tui_selftest () { +#ifdef TUI selftests::register_test ("tui", selftests::tui::run_tests); +#endif } |