2001-07-24 20:40:39 +00:00
|
|
|
/* GDB hooks for TUI.
|
2002-03-01 06:19:28 +00:00
|
|
|
|
2007-01-09 17:59:20 +00:00
|
|
|
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
2006-03-29 22:53:33 +00:00
|
|
|
Free Software Foundation, Inc.
|
2001-07-24 20:40:39 +00:00
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2005-12-23 19:10:03 +00:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA. */
|
2001-07-24 20:40:39 +00:00
|
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
#include "symtab.h"
|
|
|
|
#include "inferior.h"
|
|
|
|
#include "command.h"
|
|
|
|
#include "bfd.h"
|
|
|
|
#include "symfile.h"
|
|
|
|
#include "objfiles.h"
|
|
|
|
#include "target.h"
|
|
|
|
#include "gdbcore.h"
|
|
|
|
#include "event-loop.h"
|
2002-09-10 19:59:31 +00:00
|
|
|
#include "event-top.h"
|
2001-07-24 20:40:39 +00:00
|
|
|
#include "frame.h"
|
|
|
|
#include "breakpoint.h"
|
|
|
|
#include "gdb-events.h"
|
2002-09-10 19:59:31 +00:00
|
|
|
#include "ui-out.h"
|
|
|
|
#include "top.h"
|
2001-07-24 20:40:39 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
2004-01-19 04:31:53 +00:00
|
|
|
#include "tui/tui.h"
|
2004-02-10 Andrew Cagney <cagney@redhat.com>
* defs.h: Do not include "tui.h".
* gdb_curses.h: New file.
* tui/tui-hooks.h: New file.
* tui/tui.h (tui_update_all_exec_infos): Delete declaration.
(tui_install_hooks, tui_remove_hooks): Delete declarations.
(tui_initialize_io): Delete declaration.
(tui_initialize_readline: Delete redundant declaration.
(struct tui_point): Delete definition.
* tui/tui-data.h (struct tui_point): Define.
* cli/cli-decode.c [TUI]: Include "tui/tui.h".
* utils.c: Include "tui/tui.h".
* tui/tui-data.h: Include "tui/tui.h" and "gdb_curses.h".
* printcmd.c [TUI]: Include "tui/tui.h".
* cli/cli-cmds.c [TUI]: Include "tui/tui.h".
* tui/tui-command.c: Include "gdb_curses.h".
* tui/tui.c, tui/tui-winsource.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-windata.c, tui/tui-win.c, tui/tui-stack.c: Ditto.
* tui/tui-source.c, tui/tui-regs.c, tui/tui-layout.c: Ditto.
* tui/tui-io.c, tui/tui-disasm.c, tui/tui-data.c: : Ditto.
* tui/tui-hooks.c: Include "tui-hooks.h" and "gdb_curses.h".
* Makefile.in: Update all dependencies.
(tui_hooks_h, gdb_curses_h): Define.
(SUBDIR_TUI_CFLAGS): Remove -I${srcdir}/tui.
2004-02-10 19:08:19 +00:00
|
|
|
#include "tui/tui-hooks.h"
|
2004-01-19 04:31:53 +00:00
|
|
|
#include "tui/tui-data.h"
|
|
|
|
#include "tui/tui-layout.h"
|
|
|
|
#include "tui/tui-io.h"
|
|
|
|
#include "tui/tui-regs.h"
|
|
|
|
#include "tui/tui-win.h"
|
|
|
|
#include "tui/tui-stack.h"
|
|
|
|
#include "tui/tui-windata.h"
|
|
|
|
#include "tui/tui-winsource.h"
|
2001-07-24 20:40:39 +00:00
|
|
|
|
2004-02-10 Andrew Cagney <cagney@redhat.com>
* defs.h: Do not include "tui.h".
* gdb_curses.h: New file.
* tui/tui-hooks.h: New file.
* tui/tui.h (tui_update_all_exec_infos): Delete declaration.
(tui_install_hooks, tui_remove_hooks): Delete declarations.
(tui_initialize_io): Delete declaration.
(tui_initialize_readline: Delete redundant declaration.
(struct tui_point): Delete definition.
* tui/tui-data.h (struct tui_point): Define.
* cli/cli-decode.c [TUI]: Include "tui/tui.h".
* utils.c: Include "tui/tui.h".
* tui/tui-data.h: Include "tui/tui.h" and "gdb_curses.h".
* printcmd.c [TUI]: Include "tui/tui.h".
* cli/cli-cmds.c [TUI]: Include "tui/tui.h".
* tui/tui-command.c: Include "gdb_curses.h".
* tui/tui.c, tui/tui-winsource.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-windata.c, tui/tui-win.c, tui/tui-stack.c: Ditto.
* tui/tui-source.c, tui/tui-regs.c, tui/tui-layout.c: Ditto.
* tui/tui-io.c, tui/tui-disasm.c, tui/tui-data.c: : Ditto.
* tui/tui-hooks.c: Include "tui-hooks.h" and "gdb_curses.h".
* Makefile.in: Update all dependencies.
(tui_hooks_h, gdb_curses_h): Define.
(SUBDIR_TUI_CFLAGS): Remove -I${srcdir}/tui.
2004-02-10 19:08:19 +00:00
|
|
|
#include "gdb_curses.h"
|
2003-06-22 15:21:39 +00:00
|
|
|
|
2004-04-09 13:54:34 +00:00
|
|
|
/* This redefines CTRL if it is not already defined, so it must come
|
|
|
|
after terminal state releated include files like <term.h> and
|
|
|
|
"gdb_curses.h". */
|
|
|
|
#include "readline/readline.h"
|
|
|
|
|
2001-07-24 20:40:39 +00:00
|
|
|
int tui_target_has_run = 0;
|
|
|
|
|
|
|
|
static void (* tui_target_new_objfile_chain) (struct objfile*);
|
|
|
|
|
|
|
|
static void
|
|
|
|
tui_new_objfile_hook (struct objfile* objfile)
|
|
|
|
{
|
|
|
|
if (tui_active)
|
2002-08-25 19:19:50 +00:00
|
|
|
tui_display_main ();
|
2001-07-24 20:40:39 +00:00
|
|
|
|
|
|
|
if (tui_target_new_objfile_chain)
|
|
|
|
tui_target_new_objfile_chain (objfile);
|
|
|
|
}
|
|
|
|
|
From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>:
gdb/
* cli-out.c (cli_field_fmt, cli_message, out_field_fmt): Add
ATTR_FORMAT or ATTRIBUTE_FPTR_PRINTF.
* complaints.c (vcomplaint): Likewise.
* defs.h (xvasprintf, xstrvprintf, verror, vfatal)
(internal_verror, internal_vwarning, vwarning)
(deprecated_query_hook, deprecated_warning_hook)
(deprecated_readline_begin_hook): Likewise.
* disasm.c (fprintf_disasm): Likewise.
* exceptions.c (throw_it): Likewise.
* exceptions.h (throw_verror, throw_vfatal): Likewise.
* mi/mi-interp.c (mi_interp_query_hook): Likewise.
* mi/mi-out.c (mi_field_fmt, mi_message): Likewise.
* tui/tui-hooks.c (tui_query_hook): Likewise.
* tui/tui-out.c (tui_field_fmt, tui_message, out_field_fmt):
Likewise.
* ui-out.c (default_field_fmt, default_message, uo_field_fmt)
(uo_message): Likewise.
* ui-out.h (ui_out_field_fmt, ui_out_message, field_fmt_ftype)
(message_ftype): Likewise.
* utils.c (vfprintf_maybe_filtered, internal_vproblem)
(defaulted_query, printchar): Likewise.
gdb/gdbserver/
* server.h (error, fatal, warning): Add ATTR_FORMAT.
2005-07-31 20:56:26 +00:00
|
|
|
static int ATTR_FORMAT (printf, 1, 0)
|
2001-07-24 20:40:39 +00:00
|
|
|
tui_query_hook (const char * msg, va_list argp)
|
|
|
|
{
|
|
|
|
int retval;
|
|
|
|
int ans2;
|
|
|
|
int answer;
|
|
|
|
|
|
|
|
echo ();
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
wrap_here (""); /* Flush any buffered output */
|
|
|
|
gdb_flush (gdb_stdout);
|
|
|
|
|
|
|
|
vfprintf_filtered (gdb_stdout, msg, argp);
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 00:39:24 +00:00
|
|
|
printf_filtered (_("(y or n) "));
|
2001-07-24 20:40:39 +00:00
|
|
|
|
|
|
|
wrap_here ("");
|
|
|
|
gdb_flush (gdb_stdout);
|
|
|
|
|
|
|
|
answer = tui_getc (stdin);
|
|
|
|
clearerr (stdin); /* in case of C-d */
|
|
|
|
if (answer == EOF) /* C-d */
|
|
|
|
{
|
|
|
|
retval = 1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
/* Eat rest of input line, to EOF or newline */
|
|
|
|
if (answer != '\n')
|
|
|
|
do
|
|
|
|
{
|
|
|
|
ans2 = tui_getc (stdin);
|
|
|
|
clearerr (stdin);
|
|
|
|
}
|
|
|
|
while (ans2 != EOF && ans2 != '\n' && ans2 != '\r');
|
|
|
|
|
|
|
|
if (answer >= 'a')
|
|
|
|
answer -= 040;
|
|
|
|
if (answer == 'Y')
|
|
|
|
{
|
|
|
|
retval = 1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (answer == 'N')
|
|
|
|
{
|
|
|
|
retval = 0;
|
|
|
|
break;
|
|
|
|
}
|
2005-02-11 Andrew Cagney <cagney@gnu.org>
Mark up some of printf_filtered and printf_unfiltered.
* ada-lang.c, annotate.c, arch-utils.c, breakpoint.c: Update.
* corelow.c, cp-namespace.c, cp-support.c, dcache.c: Update.
* demangle.c, dsrec.c, dwarf2read.c, dwarfread.c: Update.
* event-loop.c, event-top.c, exec.c, f-valprint.c: Update.
* gdbtypes.c, inf-loop.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcmd.c, inflow.c, infrun.c, inftarg.c, language.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, maint.c: Update.
* mdebugread.c, memattr.c, monitor.c, objc-lang.c: Update.
* ocd.c, osabi.c, printcmd.c, procfs.c, regcache.c: Update.
* remote.c, solib-som.c, solib.c, somsolib.c, source.c: Update.
* stack.c, symfile.c, symmisc.c, target.c, thread.c: Update.
* top.c, utils.c, valprint.c, value.c, cli/cli-cmds.c: Update.
* cli/cli-dump.c, cli/cli-logging.c, tui/tui-hooks.c: Update.
* tui/tui-regs.c, tui/tui-win.c: Update.
2005-02-12 00:39:24 +00:00
|
|
|
printf_filtered (_("Please answer y or n.\n"));
|
2001-07-24 20:40:39 +00:00
|
|
|
}
|
|
|
|
noecho ();
|
|
|
|
return retval;
|
|
|
|
}
|
|
|
|
|
2007-03-29 18:55:01 +00:00
|
|
|
/* Prevent recursion of deprecated_register_changed_hook(). */
|
2001-07-24 20:40:39 +00:00
|
|
|
static int tui_refreshing_registers = 0;
|
|
|
|
|
|
|
|
static void
|
|
|
|
tui_register_changed_hook (int regno)
|
|
|
|
{
|
|
|
|
struct frame_info *fi;
|
|
|
|
|
* frame.c (deprecated_selected_frame): Rename to...
(selected_frame): ...this. Make static.
(get_selected_frame, select_frame): Update.
* frame.h (deprected_select_frame): Delete.
(deprecated_safe_get_selected_frame): Update comments.
* breakpoint.c, cli/cli-cmds.c, f-valprint.c, infcmd.c, inflow.c,
infrun.c, stack.c, tui/tui-disasm.c, tui/tui-source.c,
tui/tui-winsource.c, valops.c, varobj.c, findvar.c, macroscope.c,
parse.c, regcache.h, sh64-tdep.c, tui/tui-hooks.c, tui/tui-win.c,
tui/tui.c: Replace references to deprecated_selected_frame.
2007-02-27 19:46:04 +00:00
|
|
|
fi = get_selected_frame (NULL);
|
|
|
|
if (tui_refreshing_registers == 0)
|
2001-07-24 20:40:39 +00:00
|
|
|
{
|
|
|
|
tui_refreshing_registers = 1;
|
2004-02-07 00:23:56 +00:00
|
|
|
tui_check_data_values (fi);
|
2001-07-24 20:40:39 +00:00
|
|
|
tui_refreshing_registers = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Breakpoint creation hook.
|
|
|
|
Update the screen to show the new breakpoint. */
|
|
|
|
static void
|
|
|
|
tui_event_create_breakpoint (int number)
|
|
|
|
{
|
2002-08-30 20:07:05 +00:00
|
|
|
tui_update_all_breakpoint_info ();
|
2001-07-24 20:40:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Breakpoint deletion hook.
|
|
|
|
Refresh the screen to update the breakpoint marks. */
|
|
|
|
static void
|
|
|
|
tui_event_delete_breakpoint (int number)
|
|
|
|
{
|
2002-08-30 20:07:05 +00:00
|
|
|
tui_update_all_breakpoint_info ();
|
2001-07-24 20:40:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
tui_event_modify_breakpoint (int number)
|
|
|
|
{
|
2002-08-30 20:07:05 +00:00
|
|
|
tui_update_all_breakpoint_info ();
|
2001-07-24 20:40:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
tui_event_default (int number)
|
|
|
|
{
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct gdb_events *tui_old_event_hooks;
|
|
|
|
|
|
|
|
static struct gdb_events tui_event_hooks =
|
|
|
|
{
|
|
|
|
tui_event_create_breakpoint,
|
|
|
|
tui_event_delete_breakpoint,
|
|
|
|
tui_event_modify_breakpoint,
|
|
|
|
tui_event_default,
|
|
|
|
tui_event_default,
|
|
|
|
tui_event_default
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Called when going to wait for the target.
|
|
|
|
Leave curses mode and setup program mode. */
|
|
|
|
static ptid_t
|
|
|
|
tui_target_wait_hook (ptid_t pid, struct target_waitstatus *status)
|
|
|
|
{
|
|
|
|
ptid_t res;
|
|
|
|
|
|
|
|
/* Leave tui mode (optional). */
|
|
|
|
#if 0
|
|
|
|
if (tui_active)
|
|
|
|
{
|
|
|
|
target_terminal_ours ();
|
|
|
|
endwin ();
|
|
|
|
target_terminal_inferior ();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
tui_target_has_run = 1;
|
|
|
|
res = target_wait (pid, status);
|
|
|
|
|
|
|
|
if (tui_active)
|
|
|
|
{
|
|
|
|
/* TODO: need to refresh (optional). */
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* The selected frame has changed. This is happens after a target
|
|
|
|
stop or when the user explicitly changes the frame (up/down/thread/...). */
|
|
|
|
static void
|
|
|
|
tui_selected_frame_level_changed_hook (int level)
|
|
|
|
{
|
|
|
|
struct frame_info *fi;
|
|
|
|
|
2007-03-29 18:55:01 +00:00
|
|
|
/* Negative level means that the selected frame was cleared. */
|
|
|
|
if (level < 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fi = get_selected_frame (NULL);
|
2001-07-24 20:40:39 +00:00
|
|
|
/* Ensure that symbols for this frame are read in. Also, determine the
|
|
|
|
source language of this frame, and switch to it if desired. */
|
|
|
|
if (fi)
|
|
|
|
{
|
|
|
|
struct symtab *s;
|
|
|
|
|
2003-06-12 15:44:24 +00:00
|
|
|
s = find_pc_symtab (get_frame_pc (fi));
|
2001-07-24 20:40:39 +00:00
|
|
|
/* 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)
|
2002-08-25 18:42:32 +00:00
|
|
|
select_source_symtab (s);
|
|
|
|
|
|
|
|
/* Display the frame position (even if there is no symbols). */
|
2004-01-28 23:16:50 +00:00
|
|
|
tui_show_frame_info (fi);
|
2001-07-24 20:40:39 +00:00
|
|
|
|
|
|
|
/* Refresh the register window if it's visible. */
|
|
|
|
if (tui_is_window_visible (DATA_WIN))
|
|
|
|
{
|
|
|
|
tui_refreshing_registers = 1;
|
2004-02-07 00:23:56 +00:00
|
|
|
tui_check_data_values (fi);
|
2001-07-24 20:40:39 +00:00
|
|
|
tui_refreshing_registers = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Called from print_frame_info to list the line we stopped in. */
|
|
|
|
static void
|
|
|
|
tui_print_frame_info_listing_hook (struct symtab *s, int line,
|
|
|
|
int stopline, int noerror)
|
|
|
|
{
|
|
|
|
select_source_symtab (s);
|
* frame.c (deprecated_selected_frame): Rename to...
(selected_frame): ...this. Make static.
(get_selected_frame, select_frame): Update.
* frame.h (deprected_select_frame): Delete.
(deprecated_safe_get_selected_frame): Update comments.
* breakpoint.c, cli/cli-cmds.c, f-valprint.c, infcmd.c, inflow.c,
infrun.c, stack.c, tui/tui-disasm.c, tui/tui-source.c,
tui/tui-winsource.c, valops.c, varobj.c, findvar.c, macroscope.c,
parse.c, regcache.h, sh64-tdep.c, tui/tui-hooks.c, tui/tui-win.c,
tui/tui.c: Replace references to deprecated_selected_frame.
2007-02-27 19:46:04 +00:00
|
|
|
tui_show_frame_info (get_selected_frame (NULL));
|
2001-07-24 20:40:39 +00:00
|
|
|
}
|
|
|
|
|
2002-09-01 12:49:32 +00:00
|
|
|
/* Called when the target process died or is detached.
|
|
|
|
Update the status line. */
|
|
|
|
static void
|
|
|
|
tui_detach_hook (void)
|
|
|
|
{
|
2004-01-28 23:16:50 +00:00
|
|
|
tui_show_frame_info (0);
|
2002-09-01 12:49:32 +00:00
|
|
|
tui_display_main ();
|
|
|
|
}
|
|
|
|
|
2001-07-24 20:40:39 +00:00
|
|
|
/* Install the TUI specific hooks. */
|
|
|
|
void
|
|
|
|
tui_install_hooks (void)
|
|
|
|
{
|
2004-04-21 Andrew Cagney <cagney@redhat.com>
* annotate.h (deprecated_annotate_starting_hook)
(deprecated_annotate_stopped_hook)
(deprecated_annotate_exited_hook)
(deprecated_annotate_signal_hook)
(deprecated_annotate_signalled_hook): Deprecate.
* tracepoint.h (deprecated_create_tracepoint_hook)
(deprecated_delete_tracepoint_hook)
(deprecated_modify_tracepoint_hook)
(deprecated_trace_find_hook)
(deprecated_trace_start_stop_hook): Deprecate.
* target.h (deprecated_target_new_objfile_hook): Deprecate.
* remote.h (deprecated_target_resume_hook)
(deprecated_target_wait_loop_hook): Deprecate.
* gdbcore.h (deprecated_exec_file_display_hook)
(deprecated_file_changed_hook): Deprecate.
* frame.h (deprecated_selected_frame_level_changed_hook): Deprecate.
* defs.h (deprecated_modify_breakpoint_hook)
(deprecated_command_loop_hook, deprecated_show_load_progress)
(deprecated_print_frame_info_listing_hook)
(deprecated_query_hook, deprecated_warning_hook)
(deprecated_flush_hook, deprecated_create_breakpoint_hook)
(deprecated_delete_breakpoint_hook)
(deprecated_interactive_hook, deprecated_registers_changed_hook)
(deprecated_readline_begin_hook, deprecated_readline_hook)
(deprecated_readline_end_hook, deprecated_register_changed_hook)
(deprecated_memory_changed_hook, deprecated_init_ui_hook)
(deprecated_context_hook, deprecated_target_wait_hook)
(deprecated_attach_hook, deprecated_detach_hook)
(deprecated_call_command_hook, deprecated_set_hook)
(deprecated_error_hook, deprecated_error_begin_hook)
(deprecated_ui_load_progress_hook): Deprecate.
* valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update.
* tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update.
* target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update.
* remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update.
* main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update.
* exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update.
* annotate.c, aix-thread.c: Update.
2004-04-21 23:52:21 +00:00
|
|
|
deprecated_target_wait_hook = tui_target_wait_hook;
|
|
|
|
deprecated_selected_frame_level_changed_hook = tui_selected_frame_level_changed_hook;
|
|
|
|
deprecated_print_frame_info_listing_hook = tui_print_frame_info_listing_hook;
|
2001-07-24 20:40:39 +00:00
|
|
|
|
2004-04-21 Andrew Cagney <cagney@redhat.com>
* annotate.h (deprecated_annotate_starting_hook)
(deprecated_annotate_stopped_hook)
(deprecated_annotate_exited_hook)
(deprecated_annotate_signal_hook)
(deprecated_annotate_signalled_hook): Deprecate.
* tracepoint.h (deprecated_create_tracepoint_hook)
(deprecated_delete_tracepoint_hook)
(deprecated_modify_tracepoint_hook)
(deprecated_trace_find_hook)
(deprecated_trace_start_stop_hook): Deprecate.
* target.h (deprecated_target_new_objfile_hook): Deprecate.
* remote.h (deprecated_target_resume_hook)
(deprecated_target_wait_loop_hook): Deprecate.
* gdbcore.h (deprecated_exec_file_display_hook)
(deprecated_file_changed_hook): Deprecate.
* frame.h (deprecated_selected_frame_level_changed_hook): Deprecate.
* defs.h (deprecated_modify_breakpoint_hook)
(deprecated_command_loop_hook, deprecated_show_load_progress)
(deprecated_print_frame_info_listing_hook)
(deprecated_query_hook, deprecated_warning_hook)
(deprecated_flush_hook, deprecated_create_breakpoint_hook)
(deprecated_delete_breakpoint_hook)
(deprecated_interactive_hook, deprecated_registers_changed_hook)
(deprecated_readline_begin_hook, deprecated_readline_hook)
(deprecated_readline_end_hook, deprecated_register_changed_hook)
(deprecated_memory_changed_hook, deprecated_init_ui_hook)
(deprecated_context_hook, deprecated_target_wait_hook)
(deprecated_attach_hook, deprecated_detach_hook)
(deprecated_call_command_hook, deprecated_set_hook)
(deprecated_error_hook, deprecated_error_begin_hook)
(deprecated_ui_load_progress_hook): Deprecate.
* valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update.
* tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update.
* target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update.
* remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update.
* main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update.
* exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update.
* annotate.c, aix-thread.c: Update.
2004-04-21 23:52:21 +00:00
|
|
|
deprecated_query_hook = tui_query_hook;
|
2001-07-24 20:40:39 +00:00
|
|
|
|
|
|
|
/* Install the event hooks. */
|
2004-06-26 20:37:13 +00:00
|
|
|
tui_old_event_hooks = deprecated_set_gdb_event_hooks (&tui_event_hooks);
|
2001-07-24 20:40:39 +00:00
|
|
|
|
2004-04-21 Andrew Cagney <cagney@redhat.com>
* annotate.h (deprecated_annotate_starting_hook)
(deprecated_annotate_stopped_hook)
(deprecated_annotate_exited_hook)
(deprecated_annotate_signal_hook)
(deprecated_annotate_signalled_hook): Deprecate.
* tracepoint.h (deprecated_create_tracepoint_hook)
(deprecated_delete_tracepoint_hook)
(deprecated_modify_tracepoint_hook)
(deprecated_trace_find_hook)
(deprecated_trace_start_stop_hook): Deprecate.
* target.h (deprecated_target_new_objfile_hook): Deprecate.
* remote.h (deprecated_target_resume_hook)
(deprecated_target_wait_loop_hook): Deprecate.
* gdbcore.h (deprecated_exec_file_display_hook)
(deprecated_file_changed_hook): Deprecate.
* frame.h (deprecated_selected_frame_level_changed_hook): Deprecate.
* defs.h (deprecated_modify_breakpoint_hook)
(deprecated_command_loop_hook, deprecated_show_load_progress)
(deprecated_print_frame_info_listing_hook)
(deprecated_query_hook, deprecated_warning_hook)
(deprecated_flush_hook, deprecated_create_breakpoint_hook)
(deprecated_delete_breakpoint_hook)
(deprecated_interactive_hook, deprecated_registers_changed_hook)
(deprecated_readline_begin_hook, deprecated_readline_hook)
(deprecated_readline_end_hook, deprecated_register_changed_hook)
(deprecated_memory_changed_hook, deprecated_init_ui_hook)
(deprecated_context_hook, deprecated_target_wait_hook)
(deprecated_attach_hook, deprecated_detach_hook)
(deprecated_call_command_hook, deprecated_set_hook)
(deprecated_error_hook, deprecated_error_begin_hook)
(deprecated_ui_load_progress_hook): Deprecate.
* valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update.
* tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update.
* target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update.
* remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update.
* main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update.
* exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update.
* annotate.c, aix-thread.c: Update.
2004-04-21 23:52:21 +00:00
|
|
|
deprecated_register_changed_hook = tui_register_changed_hook;
|
|
|
|
deprecated_detach_hook = tui_detach_hook;
|
2001-07-24 20:40:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Remove the TUI specific hooks. */
|
|
|
|
void
|
|
|
|
tui_remove_hooks (void)
|
|
|
|
{
|
2004-04-21 Andrew Cagney <cagney@redhat.com>
* annotate.h (deprecated_annotate_starting_hook)
(deprecated_annotate_stopped_hook)
(deprecated_annotate_exited_hook)
(deprecated_annotate_signal_hook)
(deprecated_annotate_signalled_hook): Deprecate.
* tracepoint.h (deprecated_create_tracepoint_hook)
(deprecated_delete_tracepoint_hook)
(deprecated_modify_tracepoint_hook)
(deprecated_trace_find_hook)
(deprecated_trace_start_stop_hook): Deprecate.
* target.h (deprecated_target_new_objfile_hook): Deprecate.
* remote.h (deprecated_target_resume_hook)
(deprecated_target_wait_loop_hook): Deprecate.
* gdbcore.h (deprecated_exec_file_display_hook)
(deprecated_file_changed_hook): Deprecate.
* frame.h (deprecated_selected_frame_level_changed_hook): Deprecate.
* defs.h (deprecated_modify_breakpoint_hook)
(deprecated_command_loop_hook, deprecated_show_load_progress)
(deprecated_print_frame_info_listing_hook)
(deprecated_query_hook, deprecated_warning_hook)
(deprecated_flush_hook, deprecated_create_breakpoint_hook)
(deprecated_delete_breakpoint_hook)
(deprecated_interactive_hook, deprecated_registers_changed_hook)
(deprecated_readline_begin_hook, deprecated_readline_hook)
(deprecated_readline_end_hook, deprecated_register_changed_hook)
(deprecated_memory_changed_hook, deprecated_init_ui_hook)
(deprecated_context_hook, deprecated_target_wait_hook)
(deprecated_attach_hook, deprecated_detach_hook)
(deprecated_call_command_hook, deprecated_set_hook)
(deprecated_error_hook, deprecated_error_begin_hook)
(deprecated_ui_load_progress_hook): Deprecate.
* valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update.
* tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update.
* target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update.
* remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update.
* main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update.
* exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update.
* annotate.c, aix-thread.c: Update.
2004-04-21 23:52:21 +00:00
|
|
|
deprecated_target_wait_hook = 0;
|
|
|
|
deprecated_selected_frame_level_changed_hook = 0;
|
|
|
|
deprecated_print_frame_info_listing_hook = 0;
|
|
|
|
deprecated_query_hook = 0;
|
|
|
|
deprecated_register_changed_hook = 0;
|
|
|
|
deprecated_detach_hook = 0;
|
2001-07-24 20:40:39 +00:00
|
|
|
|
|
|
|
/* Restore the previous event hooks. */
|
2004-06-26 20:37:13 +00:00
|
|
|
deprecated_set_gdb_event_hooks (tui_old_event_hooks);
|
2001-07-24 20:40:39 +00:00
|
|
|
}
|
|
|
|
|
2003-02-14 13:58:06 +00:00
|
|
|
void _initialize_tui_hooks (void);
|
2002-09-10 19:59:31 +00:00
|
|
|
|
2003-02-14 13:58:06 +00:00
|
|
|
void
|
|
|
|
_initialize_tui_hooks (void)
|
2001-07-24 20:40:39 +00:00
|
|
|
{
|
|
|
|
/* Install the permanent hooks. */
|
2004-04-21 Andrew Cagney <cagney@redhat.com>
* annotate.h (deprecated_annotate_starting_hook)
(deprecated_annotate_stopped_hook)
(deprecated_annotate_exited_hook)
(deprecated_annotate_signal_hook)
(deprecated_annotate_signalled_hook): Deprecate.
* tracepoint.h (deprecated_create_tracepoint_hook)
(deprecated_delete_tracepoint_hook)
(deprecated_modify_tracepoint_hook)
(deprecated_trace_find_hook)
(deprecated_trace_start_stop_hook): Deprecate.
* target.h (deprecated_target_new_objfile_hook): Deprecate.
* remote.h (deprecated_target_resume_hook)
(deprecated_target_wait_loop_hook): Deprecate.
* gdbcore.h (deprecated_exec_file_display_hook)
(deprecated_file_changed_hook): Deprecate.
* frame.h (deprecated_selected_frame_level_changed_hook): Deprecate.
* defs.h (deprecated_modify_breakpoint_hook)
(deprecated_command_loop_hook, deprecated_show_load_progress)
(deprecated_print_frame_info_listing_hook)
(deprecated_query_hook, deprecated_warning_hook)
(deprecated_flush_hook, deprecated_create_breakpoint_hook)
(deprecated_delete_breakpoint_hook)
(deprecated_interactive_hook, deprecated_registers_changed_hook)
(deprecated_readline_begin_hook, deprecated_readline_hook)
(deprecated_readline_end_hook, deprecated_register_changed_hook)
(deprecated_memory_changed_hook, deprecated_init_ui_hook)
(deprecated_context_hook, deprecated_target_wait_hook)
(deprecated_attach_hook, deprecated_detach_hook)
(deprecated_call_command_hook, deprecated_set_hook)
(deprecated_error_hook, deprecated_error_begin_hook)
(deprecated_ui_load_progress_hook): Deprecate.
* valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update.
* tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update.
* target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update.
* remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update.
* main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update.
* exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update.
* annotate.c, aix-thread.c: Update.
2004-04-21 23:52:21 +00:00
|
|
|
tui_target_new_objfile_chain = deprecated_target_new_objfile_hook;
|
|
|
|
deprecated_target_new_objfile_hook = tui_new_objfile_hook;
|
2001-07-24 20:40:39 +00:00
|
|
|
}
|