diff options
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui-io.c | 5 | ||||
-rw-r--r-- | gdb/tui/tui-win.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index b8954af..8472464 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -1197,7 +1197,10 @@ tui_getc_1 (FILE *fp) Compare keyname instead. */ if (ch >= KEY_MAX) { - auto name = gdb::string_view (keyname (ch)); + std::string_view name; + const char *name_str = keyname (ch); + if (name_str != nullptr) + name = std::string_view (name_str); /* The following sequences are hardcoded in readline as well. */ diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index a0a1233..9219c1f 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -54,7 +54,7 @@ #include "gdb_curses.h" #include <ctype.h> #include "readline/readline.h" -#include "gdbsupport/gdb_string_view.h" +#include <string_view> #include <signal.h> @@ -663,7 +663,7 @@ tui_scroll_right_command (const char *arg, int from_tty) /* Answer the window represented by name. */ static struct tui_win_info * -tui_partial_win_by_name (gdb::string_view name) +tui_partial_win_by_name (std::string_view name) { struct tui_win_info *best = nullptr; @@ -935,7 +935,7 @@ tui_set_win_size (const char *arg, bool set_width_p) buf_ptr = skip_to_space (buf_ptr); /* Validate the window name. */ - gdb::string_view wname (buf, buf_ptr - buf); + std::string_view wname (buf, buf_ptr - buf); win_info = tui_partial_win_by_name (wname); if (win_info == NULL) |