aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-02-22 11:48:26 -0700
committerTom Tromey <tom@tromey.com>2020-02-22 11:48:39 -0700
commitfc96d20b2c6d7ff24349ad015119438077d3f1e9 (patch)
treec25c214eb42ca663a832d18e8ecc3a35f9809ebc /gdb
parent935c78c0468215e2f034f39b8285fa8bb17729b8 (diff)
downloadgdb-fc96d20b2c6d7ff24349ad015119438077d3f1e9.zip
gdb-fc96d20b2c6d7ff24349ad015119438077d3f1e9.tar.gz
gdb-fc96d20b2c6d7ff24349ad015119438077d3f1e9.tar.bz2
Remove the TUI annotation hack
do_tui_putc has some code to remove annotations from gdb output. This was added in 2001, see commit a198b876bbcb. However, I think this code is not needed. It seems very unlikely to enable both annotations and the TUI, and in any case I think this is something that should not be supported. So, this patch removes this code. gdb/ChangeLog 2020-02-22 Tom Tromey <tom@tromey.com> * tui/tui-io.c (do_tui_putc): Don't omit annotations. Change-Id: I05728110365a362d37c9821df9c8779316100bb8
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/tui/tui-io.c36
2 files changed, 15 insertions, 25 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 474825b..718e500 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2020-02-22 Tom Tromey <tom@tromey.com>
+ * tui/tui-io.c (do_tui_putc): Don't omit annotations.
+
+2020-02-22 Tom Tromey <tom@tromey.com>
+
* tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
* tui/tui-data.h (tui_set_win_with_focus): Don't declare.
* tui/tui-data.c (tui_set_win_with_focus): Remove.
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index d9f2333..b5ee2a2 100644
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -138,35 +138,21 @@ static int tui_readline_pipe[2];
static void
do_tui_putc (WINDOW *w, char c)
{
- static int tui_skip_line = -1;
-
- /* Catch annotation and discard them. We need two \032 and discard
- until a \n is seen. */
- if (c == '\032')
- {
- tui_skip_line++;
- }
- else if (tui_skip_line != 1)
+ /* Expand TABs, since ncurses on MS-Windows doesn't. */
+ if (c == '\t')
{
- tui_skip_line = -1;
- /* Expand TABs, since ncurses on MS-Windows doesn't. */
- if (c == '\t')
- {
- int col;
+ int col;
- col = getcurx (w);
- do
- {
- waddch (w, ' ');
- col++;
- }
- while ((col % 8) != 0);
+ col = getcurx (w);
+ do
+ {
+ waddch (w, ' ');
+ col++;
}
- else
- waddch (w, c);
+ while ((col % 8) != 0);
}
- else if (c == '\n')
- tui_skip_line = -1;
+ else
+ waddch (w, c);
}
/* Update the cached value of the command window's start line based on