+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...
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);
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. */
/* 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;
#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"
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
select_frame (get_current_frame (), 0);
}
-
- TUIDO (((TuiOpaqueFuncPtr) tui_vCheckDataValues, selected_frame));
-
done:
annotate_stopped ();
}
#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;
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 ();
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]);
{
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;
{
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;
}
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);
}
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);
}
\f
-#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
void
show_stack_frame (struct frame_info *fi)
{
- TUIDO (((TuiOpaqueFuncPtr) tui_vShowFrameInfo, fi));
}
\f
{
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));
- }
}
}
\f
if (fi)
{
print_stack_frame (fi, level, 1);
- TUIDO (((TuiOpaqueFuncPtr) tui_vCheckDataValues, fi));
}
}
\f
-/* 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. */
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
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
{
error ("no symbol file name was specified");
}
- TUIDO (((TuiOpaqueFuncPtr) tuiDisplayMainFunction));
do_cleanups (cleanups);
}
}
while (instream && !feof (instream))
{
-#if defined(TUI)
- extern int insert_mode;
-#endif
if (window_hook && instream == stdin)
(*window_hook) (instream, get_prompt ());
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;
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);
}
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 */
{
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;