[binutils-gdb] gdb/python: Fix --disable-tui build
Kévin Le Gouguec
legouguec@sourceware.org
Mon Mar 6 16:44:43 GMT 2023
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1d6653fd3f4e0d7140e705733412fd75c40177b2
commit 1d6653fd3f4e0d7140e705733412fd75c40177b2
Author: Kévin Le Gouguec <legouguec@adacore.com>
Date: Wed Feb 22 13:37:06 2023 +0100
gdb/python: Fix --disable-tui build
As of 2023-02-13 "gdb/python: deallocate tui window factories at Python
shut down" (9ae4519da90), a TUI-less build fails with:
$src/gdb/python/py-tui.c: In function ‘void gdbpy_finalize_tui()’:
$src/gdb/python/py-tui.c:621:3: error: ‘gdbpy_tui_window_maker’ has not been declared
621 | gdbpy_tui_window_maker::invalidate_all ();
| ^~~~~~~~~~~~~~~~~~~~~~
Since gdbpy_tui_window_maker is only defined under #ifdef TUI, add an
#ifdef guard in gdbpy_finalize_tui as well.
Diff:
---
gdb/python/py-tui.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/python/py-tui.c b/gdb/python/py-tui.c
index 9ce76659052..92fa0591e5c 100644
--- a/gdb/python/py-tui.c
+++ b/gdb/python/py-tui.c
@@ -618,5 +618,7 @@ gdbpy_initialize_tui ()
void
gdbpy_finalize_tui ()
{
+#ifdef TUI
gdbpy_tui_window_maker::invalidate_all ();
+#endif /* TUI */
}
More information about the Gdb-cvs
mailing list