diff options
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui-command.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-command.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-data.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-data.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-disasm.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-disasm.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-file.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-file.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-hooks.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-hooks.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-interp.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-io.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-io.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-layout.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-layout.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-location.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-location.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-regs.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-regs.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-source.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-source.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-status.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-status.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-win.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-win.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-wingeneral.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-wingeneral.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-winsource.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-winsource.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui.c | 22 | ||||
-rw-r--r-- | gdb/tui/tui.h | 2 |
31 files changed, 48 insertions, 34 deletions
diff --git a/gdb/tui/tui-command.c b/gdb/tui/tui-command.c index 677721d..9bd33e2 100644 --- a/gdb/tui/tui-command.c +++ b/gdb/tui/tui-command.c @@ -1,6 +1,6 @@ /* Specific command window processing. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-command.h b/gdb/tui/tui-command.h index 61f8cf3..2f82291 100644 --- a/gdb/tui/tui-command.h +++ b/gdb/tui/tui-command.h @@ -1,6 +1,6 @@ /* Specific command window processing. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index 962dbc5..7d1d055 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -1,6 +1,6 @@ /* TUI data manipulation routines. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 6f2087b..dd33a59 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -1,6 +1,6 @@ /* TUI data manipulation routines. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index bb1ff7b..5488760 100644 --- a/gdb/tui/tui-disasm.c +++ b/gdb/tui/tui-disasm.c @@ -1,6 +1,6 @@ /* Disassembly display. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-disasm.h b/gdb/tui/tui-disasm.h index 4279bb0..173cc8b 100644 --- a/gdb/tui/tui-disasm.h +++ b/gdb/tui/tui-disasm.h @@ -1,6 +1,6 @@ /* Disassembly display. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-file.c b/gdb/tui/tui-file.c index 17ac138..39aee9f 100644 --- a/gdb/tui/tui-file.c +++ b/gdb/tui/tui-file.c @@ -1,5 +1,5 @@ /* UI_FILE - a generic STDIO like output stream. - Copyright (C) 1999-2024 Free Software Foundation, Inc. + Copyright (C) 1999-2025 Free Software Foundation, Inc. This file is part of GDB. diff --git a/gdb/tui/tui-file.h b/gdb/tui/tui-file.h index 6178a90..dbd6fa9 100644 --- a/gdb/tui/tui-file.h +++ b/gdb/tui/tui-file.h @@ -1,5 +1,5 @@ /* TUI_FILE - a STDIO-like output stream for the TUI. - Copyright (C) 1999-2024 Free Software Foundation, Inc. + Copyright (C) 1999-2025 Free Software Foundation, Inc. This file is part of GDB. diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c index 69294cc..814ddac 100644 --- a/gdb/tui/tui-hooks.c +++ b/gdb/tui/tui-hooks.c @@ -1,6 +1,6 @@ /* GDB hooks for TUI. - Copyright (C) 2001-2024 Free Software Foundation, Inc. + Copyright (C) 2001-2025 Free Software Foundation, Inc. This file is part of GDB. diff --git a/gdb/tui/tui-hooks.h b/gdb/tui/tui-hooks.h index 21ba169..6fee785 100644 --- a/gdb/tui/tui-hooks.h +++ b/gdb/tui/tui-hooks.h @@ -1,6 +1,6 @@ /* External/Public TUI hools header file, for GDB the GNU debugger. - Copyright (C) 2004-2024 Free Software Foundation, Inc. + Copyright (C) 2004-2025 Free Software Foundation, Inc. This file is part of GDB. diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c index 25761be..53acf82 100644 --- a/gdb/tui/tui-interp.c +++ b/gdb/tui/tui-interp.c @@ -1,6 +1,6 @@ /* TUI Interpreter definitions for GDB, the GNU debugger. - Copyright (C) 2003-2024 Free Software Foundation, Inc. + Copyright (C) 2003-2025 Free Software Foundation, Inc. This file is part of GDB. diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index b3ede07..1b4cc82 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -1,6 +1,6 @@ /* TUI support I/O functions. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-io.h b/gdb/tui/tui-io.h index 66b3b90..aa931f8 100644 --- a/gdb/tui/tui-io.h +++ b/gdb/tui/tui-io.h @@ -1,6 +1,6 @@ /* TUI support I/O functions. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 3fac65f..73ba0c6 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -1,6 +1,6 @@ /* TUI layout window management. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-layout.h b/gdb/tui/tui-layout.h index 107b123..6046bb6 100644 --- a/gdb/tui/tui-layout.h +++ b/gdb/tui/tui-layout.h @@ -1,6 +1,6 @@ /* TUI layout window management. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-location.c b/gdb/tui/tui-location.c index 8e63d4f..24a14fb 100644 --- a/gdb/tui/tui-location.c +++ b/gdb/tui/tui-location.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2021-2024 Free Software Foundation, Inc. +/* Copyright (C) 2021-2025 Free Software Foundation, Inc. This file is part of GDB. diff --git a/gdb/tui/tui-location.h b/gdb/tui/tui-location.h index 5eda4bd..eecefbc 100644 --- a/gdb/tui/tui-location.h +++ b/gdb/tui/tui-location.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2021-2024 Free Software Foundation, Inc. +/* Copyright (C) 2021-2025 Free Software Foundation, Inc. This file is part of GDB. diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 5158c06..0b8cb85 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -1,6 +1,6 @@ /* TUI display registers in window. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h index 48f6aa0..5f7afa6 100644 --- a/gdb/tui/tui-regs.h +++ b/gdb/tui/tui-regs.h @@ -1,6 +1,6 @@ /* TUI display registers in window. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c index 2ef0308..e2dff84 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -1,6 +1,6 @@ /* TUI display source window. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-source.h b/gdb/tui/tui-source.h index 10702b2..626ac40 100644 --- a/gdb/tui/tui-source.h +++ b/gdb/tui/tui-source.h @@ -1,6 +1,6 @@ /* TUI display source window. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-status.c b/gdb/tui/tui-status.c index fa2d07c..484f4e5 100644 --- a/gdb/tui/tui-status.c +++ b/gdb/tui/tui-status.c @@ -1,6 +1,6 @@ /* TUI status line. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-status.h b/gdb/tui/tui-status.h index 8b507fd..2a84732 100644 --- a/gdb/tui/tui-status.h +++ b/gdb/tui/tui-status.h @@ -1,6 +1,6 @@ /* TUI status line. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 95639f5..f44600d 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -1,6 +1,6 @@ /* TUI window generic functions. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-win.h b/gdb/tui/tui-win.h index 1521993..64153cf 100644 --- a/gdb/tui/tui-win.h +++ b/gdb/tui/tui-win.h @@ -1,6 +1,6 @@ /* TUI window generic functions. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index 90fdaceb..de4ef52 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -1,6 +1,6 @@ /* General window behavior. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-wingeneral.h b/gdb/tui/tui-wingeneral.h index b037e79..0e0e5fe 100644 --- a/gdb/tui/tui-wingeneral.h +++ b/gdb/tui/tui-wingeneral.h @@ -1,6 +1,6 @@ /* General window behavior. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index b5889a8..a545c48 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -1,6 +1,6 @@ /* TUI display source/assembly window. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h index deae786..b531f0e 100644 --- a/gdb/tui/tui-winsource.h +++ b/gdb/tui/tui-winsource.h @@ -1,6 +1,6 @@ /* TUI display source/assembly window. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index 491fcb1..2c7a6a0 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -1,6 +1,6 @@ /* General functions for the WDB TUI. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. @@ -67,7 +67,12 @@ show_tui_debug (struct ui_file *file, int from_tty, /* Tells whether the TUI is active or not. */ bool tui_active = false; -static bool tui_finish_init = true; + +/* Tells whether the TUI should do deferred curses initialization. + If TRIBOOL_TRUE, then yes. If TRIBOOL_FALSE. then no (because + initialization is already done). If TRIBOOL_UNKNOWN, then no (because + initialization failed). */ +static tribool tui_finish_init = TRIBOOL_TRUE; enum tui_key_mode tui_current_key_mode = TUI_COMMAND_MODE; @@ -392,7 +397,13 @@ tui_enable (void) /* To avoid to initialize curses when gdb starts, there is a deferred curses initialization. This initialization is made only once and the first time the curses mode is entered. */ - if (tui_finish_init) + if (tui_finish_init == TRIBOOL_UNKNOWN) + { + /* Initialization failed before, just throw a generic error, don't try + again. */ + error (_("Cannot enable the TUI")); + } + else if (tui_finish_init == TRIBOOL_TRUE) { WINDOW *w; SCREEN *s; @@ -412,6 +423,9 @@ tui_enable (void) if (!gdb_stderr->isatty ()) error (_("Cannot enable the TUI when output is not a terminal")); + /* Don't try initialization again. */ + tui_finish_init = TRIBOOL_UNKNOWN; + s = newterm (NULL, stdout, stdin); #ifdef __MINGW32__ /* The MinGW port of ncurses requires $TERM to be unset in order @@ -470,7 +484,7 @@ tui_enable (void) tui_set_win_focus_to (tui_src_win ()); keypad (tui_cmd_win ()->handle.get (), TRUE); wrefresh (tui_cmd_win ()->handle.get ()); - tui_finish_init = false; + tui_finish_init = TRIBOOL_FALSE; } else { diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h index 319bd2e..3a9d955 100644 --- a/gdb/tui/tui.h +++ b/gdb/tui/tui.h @@ -1,6 +1,6 @@ /* External/Public TUI Header File. - Copyright (C) 1998-2024 Free Software Foundation, Inc. + Copyright (C) 1998-2025 Free Software Foundation, Inc. Contributed by Hewlett-Packard Company. |