aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2001-07-14 18:59:07 +0000
committerStephane Carrez <stcarrez@nerim.fr>2001-07-14 18:59:07 +0000
commit37767e423b008f0dbd38b3f0ed07ecacc163a9b3 (patch)
tree0adcd4e9c47b912024ee47094a3539c6cfc47f1d
parent5030876b5d24547ba717ad06408848145374e276 (diff)
downloadgdb-37767e423b008f0dbd38b3f0ed07ecacc163a9b3.zip
gdb-37767e423b008f0dbd38b3f0ed07ecacc163a9b3.tar.gz
gdb-37767e423b008f0dbd38b3f0ed07ecacc163a9b3.tar.bz2
* utils.c (query): Remove tui hacks; tui must use the query_hook.
* top.c (command_loop): Remove tui insert_mode hacks; don't call tuiCleanUp because this must be made with atexit by tui. * symfile.c (symbol_file_command): Remove call to TUIDO * stack.c (show_and_print_stack_frame_stub): Remove tui check; not necessary when using the selected frame hooks. (print_stack_frame_stub): Likewise. (print_frame_info_base): Likewise. (print_frame_info): Likewise. (up_silently_command): Likewise. (down_silently_command): Likewise. (show_stack_frame): Likewise for TUIDO. (select_frame): Likewise. (select_and_print_frame): Likewise. (stack_publish_stopped_with_no_frame): Remove. (select_and_maybe_print_frame): Remove. * main.c (captured_main): Remove tui_fileopen and tuiInit; tui must use the initialize ui hook. * infrun.c (normal_stop): Remove call to TUIDO; tui must use the selected frame hooks. * event-top.c (command_handler): Remove tui insert_mode hack. * defs.h: Remove TUIDO; Only include tui.h. * breakpoint.c (mention): Remove calls to TUIDO. (delete_breakpoint): Remove tui hacks; tui must install the breakpoint hooks.
-rw-r--r--gdb/ChangeLog28
-rw-r--r--gdb/breakpoint.c22
-rw-r--r--gdb/defs.h12
-rw-r--r--gdb/event-top.c7
-rw-r--r--gdb/infrun.c3
-rw-r--r--gdb/main.c19
-rw-r--r--gdb/stack.c64
-rw-r--r--gdb/symfile.c1
-rw-r--r--gdb/top.c25
-rw-r--r--gdb/utils.c22
10 files changed, 35 insertions, 168 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dbe12a4..933d0ff 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,31 @@
+2001-07-14 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * utils.c (query): Remove tui hacks; tui must use the query_hook.
+ * top.c (command_loop): Remove tui insert_mode hacks; don't call
+ tuiCleanUp because this must be made with atexit by tui.
+ * symfile.c (symbol_file_command): Remove call to TUIDO
+ * stack.c (show_and_print_stack_frame_stub): Remove tui check;
+ not necessary when using the selected frame hooks.
+ (print_stack_frame_stub): Likewise.
+ (print_frame_info_base): Likewise.
+ (print_frame_info): Likewise.
+ (up_silently_command): Likewise.
+ (down_silently_command): Likewise.
+ (show_stack_frame): Likewise for TUIDO.
+ (select_frame): Likewise.
+ (select_and_print_frame): Likewise.
+ (stack_publish_stopped_with_no_frame): Remove.
+ (select_and_maybe_print_frame): Remove.
+ * main.c (captured_main): Remove tui_fileopen and tuiInit; tui
+ must use the initialize ui hook.
+ * infrun.c (normal_stop): Remove call to TUIDO; tui must use the
+ selected frame hooks.
+ * event-top.c (command_handler): Remove tui insert_mode hack.
+ * defs.h: Remove TUIDO; Only include tui.h.
+ * breakpoint.c (mention): Remove calls to TUIDO.
+ (delete_breakpoint): Remove tui hacks; tui must install
+ the breakpoint hooks.
+
2001-07-14 Mark Kettenis <kettenis@gnu.org>
* config/i386/xm-linux.h (KERNEL_U_ADDR): Move from here...
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index ed152be..77e9606 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4576,8 +4576,6 @@ mention (struct breakpoint *b)
if (b->source_file)
printf_filtered (": file %s, line %d.",
b->source_file, b->line_number);
- TUIDO (((TuiOpaqueFuncPtr) tui_vAllSetHasBreakAt, b, 1));
- TUIDO (((TuiOpaqueFuncPtr) tuiUpdateAllExecInfos));
}
#ifdef UI_OUT
do_cleanups (old_chain);
@@ -6831,26 +6829,6 @@ delete_breakpoint (struct breakpoint *bpt)
break;
}
- /* Before turning off the visuals for the bp, check to see that
- there are no other bps at the same address. */
- if (tui_version)
- {
- int clearIt;
-
- ALL_BREAKPOINTS (b)
- {
- clearIt = (b->address != bpt->address);
- if (!clearIt)
- break;
- }
-
- if (clearIt)
- {
- TUIDO (((TuiOpaqueFuncPtr) tui_vAllSetHasBreakAt, bpt, 0));
- TUIDO (((TuiOpaqueFuncPtr) tuiUpdateAllExecInfos));
- }
- }
-
check_duplicates (bpt);
/* If this breakpoint was inserted, and there is another breakpoint
at the same address, we need to insert the other breakpoint. */
diff --git a/gdb/defs.h b/gdb/defs.h
index 9467fc7..7872b3b 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -165,13 +165,6 @@ extern int is_cplus_marker (int);
/* use tui interface if non-zero */
extern int tui_version;
-#if defined(TUI)
-/* all invocations of TUIDO should have two sets of parens */
-#define TUIDO(x) tuiDo x
-#else
-#define TUIDO(x)
-#endif
-
/* enable xdb commands if set */
extern int xdb_commands;
@@ -625,11 +618,6 @@ extern struct ui_file *gdb_stdtarg;
#if defined(TUI)
#include "tui.h"
-#include "tuiCommand.h"
-#include "tuiData.h"
-#include "tuiIO.h"
-#include "tuiLayout.h"
-#include "tuiWin.h"
#endif
#include "ui-file.h"
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 40ef3ce..2519aae 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -478,18 +478,11 @@ command_handler (char *command)
extern int display_time;
extern int display_space;
-#if defined(TUI)
- extern int insert_mode;
-#endif
-
quit_flag = 0;
if (instream == stdin && stdin_is_tty)
reinitialize_more_filter ();
old_chain = make_cleanup (null_cleanup, 0);
-#if defined(TUI)
- insert_mode = 0;
-#endif
/* If readline returned a NULL command, it means that the
connection with the terminal is gone. This happens at the
end of a testsuite run, after Expect has hung up
diff --git a/gdb/infrun.c b/gdb/infrun.c
index f424477..f66298b 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3590,9 +3590,6 @@ and/or watchpoints.\n");
select_frame (get_current_frame (), 0);
}
-
- TUIDO (((TuiOpaqueFuncPtr) tui_vCheckDataValues, selected_frame));
-
done:
annotate_stopped ();
}
diff --git a/gdb/main.c b/gdb/main.c
index f7aa518..57cf136 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -36,12 +36,6 @@
#include "event-loop.h"
#include "ui-out.h"
-#if defined (TUI)
-/* FIXME: cagney/2000-01-31: This #include is to allow older code such
- as that found in the TUI to continue to build. */
-#include "tui/tui-file.h"
-#endif
-
/* If nonzero, display time usage both at startup and for each command. */
int display_time;
@@ -195,17 +189,10 @@ captured_main (void *data)
getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
current_directory = gdb_dirbuf;
-#if defined (TUI)
- gdb_stdout = tui_fileopen (stdout);
- gdb_stderr = tui_fileopen (stderr);
- gdb_stdlog = gdb_stdout; /* for moment */
- gdb_stdtarg = gdb_stderr; /* for moment */
-#else
gdb_stdout = stdio_fileopen (stdout);
gdb_stderr = stdio_fileopen (stderr);
gdb_stdlog = gdb_stderr; /* for moment */
gdb_stdtarg = gdb_stderr; /* for moment */
-#endif
/* initialize error() */
error_init ();
@@ -482,12 +469,6 @@ extern int gdbtk_test (char *);
quiet = 1;
}
-#if defined(TUI)
- /* Should this be moved to tui-top.c:_initialize_tui()? */
- if (tui_version)
- init_ui_hook = tuiInit;
-#endif
-
/* Initialize all files. Give the interpreter a chance to take
control of the console via the init_ui_hook()) */
gdb_init (argv[0]);
diff --git a/gdb/stack.c b/gdb/stack.c
index 7426e0a..c461ed2 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -149,11 +149,6 @@ show_and_print_stack_frame_stub (void *args)
{
struct print_stack_frame_args *p = (struct print_stack_frame_args *) args;
- /* Reversed order of these so tuiDo() doesn't occur
- * in the middle of "Breakpoint 1 ... [location]" printing = RT
- */
- if (tui_version)
- print_frame_info_base (p->fi, p->level, p->source, p->args);
print_frame_info (p->fi, p->level, p->source, p->args);
return 0;
@@ -167,10 +162,7 @@ print_stack_frame_stub (void *args)
{
struct print_stack_frame_args *p = (struct print_stack_frame_args *) args;
- if (tui_version)
- print_frame_info (p->fi, p->level, p->source, p->args);
- else
- print_frame_info_base (p->fi, p->level, p->source, p->args);
+ print_frame_info_base (p->fi, p->level, p->source, p->args);
return 0;
}
@@ -408,7 +400,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
fi->pc);
if (!done)
{
- if (addressprint && mid_statement && !tui_version)
+ if (addressprint && mid_statement)
{
#ifdef UI_OUT
ui_out_field_core_addr (uiout, "addr", fi->pc);
@@ -420,7 +412,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
}
if (print_frame_info_listing_hook)
print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
- else if (!tui_version)
+ else
print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
}
current_source_line = max (sal.line - lines_to_list / 2, 1);
@@ -657,33 +649,13 @@ print_frame (struct frame_info *fi,
}
-#if 0
-void
-stack_publish_stopped_with_no_frame (void)
-{
- TUIDO (((TuiOpaqueFuncPtr) tuiUpdateOnEnd));
-
- return;
-}
-#endif
-
/* Show or print the frame info. If this is the tui, it will be shown in
the source display */
void
print_frame_info (struct frame_info *fi, register int level, int source,
int args)
{
- if (!tui_version)
- print_frame_info_base (fi, level, source, args);
- else
- {
- if (fi && (frame_in_dummy (fi) || fi->signal_handler_caller))
- print_frame_info_base (fi, level, source, args);
- else
- {
- TUIDO (((TuiOpaqueFuncPtr) tui_vShowFrameInfo, fi));
- }
- }
+ print_frame_info_base (fi, level, source, args);
}
/* Show the frame info. If this is the tui, it will be shown in
@@ -691,7 +663,6 @@ print_frame_info (struct frame_info *fi, register int level, int source,
void
show_stack_frame (struct frame_info *fi)
{
- TUIDO (((TuiOpaqueFuncPtr) tui_vShowFrameInfo, fi));
}
@@ -1561,14 +1532,6 @@ select_frame (struct frame_info *fi, int level)
{
set_language (s->language);
}
- /* elz: this if here fixes the problem with the pc not being displayed
- in the tui asm layout, with no debug symbols. The value of s
- would be 0 here, and select_source_symtab would abort the
- command by calling the 'error' function */
- if (s)
- {
- TUIDO (((TuiOpaqueFuncPtr) tui_vSelectSourceSymtab, s));
- }
}
}
@@ -1582,25 +1545,10 @@ select_and_print_frame (struct frame_info *fi, int level)
if (fi)
{
print_stack_frame (fi, level, 1);
- TUIDO (((TuiOpaqueFuncPtr) tui_vCheckDataValues, fi));
}
}
-/* Select frame FI, noting that its stack level is LEVEL. Be silent if
- not the TUI */
-#if 0
-void
-select_and_maybe_print_frame (struct frame_info *fi, int level)
-{
- if (!tui_version)
- select_frame (fi, level);
- else
- select_and_print_frame (fi, level);
-}
-#endif
-
-
/* Store the selected frame and its level into *FRAMEP and *LEVELP.
If there is no selected frame, *FRAMEP is set to NULL. */
@@ -1755,8 +1703,6 @@ static void
up_silently_command (char *count_exp, int from_tty)
{
up_silently_base (count_exp);
- if (tui_version)
- print_stack_frame (selected_frame, selected_frame_level, 1);
}
static void
@@ -1802,8 +1748,6 @@ static void
down_silently_command (char *count_exp, int from_tty)
{
down_silently_base (count_exp);
- if (tui_version)
- print_stack_frame (selected_frame, selected_frame_level, 1);
}
static void
diff --git a/gdb/symfile.c b/gdb/symfile.c
index ee4d65c..4aa27bf 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1008,7 +1008,6 @@ symbol_file_command (char *args, int from_tty)
{
error ("no symbol file name was specified");
}
- TUIDO (((TuiOpaqueFuncPtr) tuiDisplayMainFunction));
do_cleanups (cleanups);
}
}
diff --git a/gdb/top.c b/gdb/top.c
index 79eaa41..2398f23 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -845,9 +845,6 @@ command_loop (void)
while (instream && !feof (instream))
{
-#if defined(TUI)
- extern int insert_mode;
-#endif
if (window_hook && instream == stdin)
(*window_hook) (instream, get_prompt ());
@@ -856,22 +853,10 @@ command_loop (void)
reinitialize_more_filter ();
old_chain = make_cleanup (null_cleanup, 0);
-#if defined(TUI)
- /* A bit of paranoia: I want to make sure the "insert_mode" global
- * is clear except when it is being used for command-line editing
- * (see tuiIO.c, utils.c); otherwise normal output will
- * get messed up in the TUI. So clear it before/after
- * the command-line-input call. - RT
- */
- insert_mode = 0;
-#endif
/* Get a command-line. This calls the readline package. */
command = command_line_input (instream == stdin ?
get_prompt () : (char *) NULL,
instream == stdin, "prompt");
-#if defined(TUI)
- insert_mode = 0;
-#endif
if (command == 0)
return;
@@ -1749,16 +1734,6 @@ quit_force (char *args, int from_tty)
do_final_cleanups (ALL_CLEANUPS); /* Do any final cleanups before exiting */
-#if defined(TUI)
- /* tuiDo((TuiOpaqueFuncPtr)tuiCleanUp); */
- /* The above does not need to be inside a tuiDo(), since
- * it is not manipulating the curses screen, but rather,
- * it is tearing it down.
- */
- if (tui_version)
- tuiCleanUp ();
-#endif
-
exit (exit_code);
}
diff --git a/gdb/utils.c b/gdb/utils.c
index a4adb86..fa8191c 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1263,15 +1263,7 @@ query (char *ctlstr,...)
wrap_here ("");
gdb_flush (gdb_stdout);
-#if defined(TUI)
- if (!tui_version || cmdWin == tuiWinWithFocus ())
-#endif
- answer = fgetc (stdin);
-#if defined(TUI)
- else
- answer = (unsigned char) tuiBufferGetc ();
-
-#endif
+ answer = fgetc (stdin);
clearerr (stdin); /* in case of C-d */
if (answer == EOF) /* C-d */
{
@@ -1279,21 +1271,13 @@ query (char *ctlstr,...)
break;
}
/* Eat rest of input line, to EOF or newline */
- if ((answer != '\n') || (tui_version && answer != '\r'))
+ if (answer != '\n')
do
{
-#if defined(TUI)
- if (!tui_version || cmdWin == tuiWinWithFocus ())
-#endif
- ans2 = fgetc (stdin);
-#if defined(TUI)
- else
- ans2 = (unsigned char) tuiBufferGetc ();
-#endif
+ ans2 = fgetc (stdin);
clearerr (stdin);
}
while (ans2 != EOF && ans2 != '\n' && ans2 != '\r');
- TUIDO (((TuiOpaqueFuncPtr) tui_vStartNewLines, 1));
if (answer >= 'a')
answer -= 040;