aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-12-27 09:43:35 -0700
committerTom Tromey <tom@tromey.com>2019-12-27 09:44:34 -0700
commitace206a5a5d86d8427607fd1af484689c0b23eaf (patch)
treec38ca6179ba4c2178ce45397ab1f6fdfa29ecd16 /gdb
parentf9ba974dea317eae6e7032b52b52314cbe43f9d8 (diff)
downloadgdb-ace206a5a5d86d8427607fd1af484689c0b23eaf.zip
gdb-ace206a5a5d86d8427607fd1af484689c0b23eaf.tar.gz
gdb-ace206a5a5d86d8427607fd1af484689c0b23eaf.tar.bz2
Remove dead code from TUI
I found some dead code in the TUI -- some using #if 0, and some commented-out code. There's no reason to keep this, so this patch removes it. gdb/ChangeLog 2019-12-27 Tom Tromey <tom@tromey.com> * tui/tui-source.c (tui_source_window::do_scroll_vertical): Remove commented-out code. * tui/tui.c: Remove #if 0 code. Change-Id: Ie00933b2ba498417ce22e5da3f62f5a40c234f33
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/tui/tui-source.c2
-rw-r--r--gdb/tui/tui.c56
3 files changed, 6 insertions, 58 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 571cd78..097f2f3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2019-12-27 Tom Tromey <tom@tromey.com>
+ * tui/tui-source.c (tui_source_window::do_scroll_vertical): Remove
+ commented-out code.
+ * tui/tui.c: Remove #if 0 code.
+
+2019-12-27 Tom Tromey <tom@tromey.com>
+
* cli/cli-cmds.c (print_disassembly): Reorder "if".
2019-12-27 Tom Tromey <tom@tromey.com>
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index 2d8ecee..700a37a 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -151,8 +151,6 @@ tui_source_window::do_scroll_vertical (int num_to_scroll)
const std::vector<off_t> *offsets;
if (g_source_cache.get_line_charpos (s, &offsets)
&& l.u.line_no > offsets->size ())
- /* line = s->nlines - win_info->content_size + 1; */
- /* elz: fix for dts 23398. */
l.u.line_no = start_line_or_addr.u.line_no;
if (l.u.line_no <= 0)
l.u.line_no = 1;
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 0ebe846..6fdfa45 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -44,9 +44,6 @@
#include <ctype.h>
#include <signal.h>
#include <fcntl.h>
-#if 0
-#include <termio.h>
-#endif
#include <setjmp.h>
#include "gdb_curses.h"
@@ -575,59 +572,6 @@ tui_disable_command (const char *args, int from_tty)
tui_disable ();
}
-#if 0
-/* Solaris <sys/termios.h> defines CTRL. */
-#ifndef CTRL
-#define CTRL(x) (x & ~0140)
-#endif
-
-#define FILEDES 2
-#define CHK(val, dft) (val<=0 ? dft : val)
-
-static void
-tui_reset (void)
-{
- struct termio mode;
-
- /* Reset the teletype mode bits to a sensible state.
- Copied tset.c. */
-#if defined (TIOCGETC)
- struct tchars tbuf;
-#endif /* TIOCGETC */
-#ifdef UCB_NTTY
- struct ltchars ltc;
-
- if (ldisc == NTTYDISC)
- {
- ioctl (FILEDES, TIOCGLTC, &ltc);
- ltc.t_suspc = CHK (ltc.t_suspc, CTRL ('Z'));
- ltc.t_dsuspc = CHK (ltc.t_dsuspc, CTRL ('Y'));
- ltc.t_rprntc = CHK (ltc.t_rprntc, CTRL ('R'));
- ltc.t_flushc = CHK (ltc.t_flushc, CTRL ('O'));
- ltc.t_werasc = CHK (ltc.t_werasc, CTRL ('W'));
- ltc.t_lnextc = CHK (ltc.t_lnextc, CTRL ('V'));
- ioctl (FILEDES, TIOCSLTC, &ltc);
- }
-#endif /* UCB_NTTY */
-#ifdef TIOCGETC
- ioctl (FILEDES, TIOCGETC, &tbuf);
- tbuf.t_intrc = CHK (tbuf.t_intrc, CTRL ('?'));
- tbuf.t_quitc = CHK (tbuf.t_quitc, CTRL ('\\'));
- tbuf.t_startc = CHK (tbuf.t_startc, CTRL ('Q'));
- tbuf.t_stopc = CHK (tbuf.t_stopc, CTRL ('S'));
- tbuf.t_eofc = CHK (tbuf.t_eofc, CTRL ('D'));
- /* brkc is left alone. */
- ioctl (FILEDES, TIOCSETC, &tbuf);
-#endif /* TIOCGETC */
- mode.sg_flags &= ~(RAW
-#ifdef CBREAK
- | CBREAK
-#endif /* CBREAK */
- | VTDELAY | ALLDELAY);
- mode.sg_flags |= XTABS | ECHO | CRMOD | ANYP;
-}
-#endif
-
void
tui_show_assembly (struct gdbarch *gdbarch, CORE_ADDR addr)
{