+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 Andrew Cagney <cagney@redhat.com>
* Makefile.in (vaxnbsd-tdep.o): Update dependencies.
static int arch64;
-/* Saved pointer to previous owner of target_new_objfile_hook. */
+/* Saved pointer to previous owner of
+ deprecated_target_new_objfile_hook. */
static void (*target_new_objfile_chain)(struct objfile *);
unpush_target (&aix_thread_ops);
}
-/* target_new_objfile_hook callback.
+/* deprecated_target_new_objfile_hook callback.
If OBJFILE is non-null, check whether a threaded application is
being debugged, and if so, prepare for thread debugging.
add_target (&aix_thread_ops);
/* Notice when object files get loaded and unloaded. */
- target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = new_objfile;
+ target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = new_objfile;
add_show_from_set (add_set_cmd ("aix-thread", no_class, var_zinteger,
(char *) &debug_aix_thread,
static void breakpoint_changed (struct breakpoint *);
-void (*annotate_starting_hook) (void);
-void (*annotate_stopped_hook) (void);
-void (*annotate_signalled_hook) (void);
-void (*annotate_signal_hook) (void);
-void (*annotate_exited_hook) (void);
+void (*deprecated_annotate_starting_hook) (void);
+void (*deprecated_annotate_stopped_hook) (void);
+void (*deprecated_annotate_signalled_hook) (void);
+void (*deprecated_annotate_signal_hook) (void);
+void (*deprecated_annotate_exited_hook) (void);
static int ignore_count_changed = 0;
annotate_starting (void)
{
- if (annotate_starting_hook)
- annotate_starting_hook ();
+ if (deprecated_annotate_starting_hook)
+ deprecated_annotate_starting_hook ();
else
{
if (annotation_level > 1)
void
annotate_stopped (void)
{
- if (annotate_stopped_hook)
- annotate_stopped_hook ();
+ if (deprecated_annotate_stopped_hook)
+ deprecated_annotate_stopped_hook ();
else
{
if (annotation_level > 1)
void
annotate_exited (int exitstatus)
{
- if (annotate_exited_hook)
- annotate_exited_hook ();
+ if (deprecated_annotate_exited_hook)
+ deprecated_annotate_exited_hook ();
else
{
if (annotation_level > 1)
void
annotate_signalled (void)
{
- if (annotate_signalled_hook)
- annotate_signalled_hook ();
+ if (deprecated_annotate_signalled_hook)
+ deprecated_annotate_signalled_hook ();
if (annotation_level > 1)
printf_filtered ("\n\032\032signalled\n");
void
annotate_signal (void)
{
- if (annotate_signal_hook)
- annotate_signal_hook ();
+ if (deprecated_annotate_signal_hook)
+ deprecated_annotate_signal_hook ();
if (annotation_level > 1)
printf_filtered ("\n\032\032signal\n");
{
if (annotation_level > 1)
{
- delete_breakpoint_hook = breakpoint_changed;
- modify_breakpoint_hook = breakpoint_changed;
+ deprecated_delete_breakpoint_hook = breakpoint_changed;
+ deprecated_modify_breakpoint_hook = breakpoint_changed;
}
}
extern void annotate_elt (void);
extern void annotate_array_section_end (void);
-extern void (*annotate_starting_hook) (void);
-extern void (*annotate_stopped_hook) (void);
-extern void (*annotate_signalled_hook) (void);
-extern void (*annotate_signal_hook) (void);
-extern void (*annotate_exited_hook) (void);
+extern void (*deprecated_annotate_starting_hook) (void);
+extern void (*deprecated_annotate_stopped_hook) (void);
+extern void (*deprecated_annotate_signalled_hook) (void);
+extern void (*deprecated_annotate_signal_hook) (void);
+extern void (*deprecated_annotate_exited_hook) (void);
stb = ui_out_stream_new (uiout);
old_chain = make_cleanup_ui_out_stream_delete (stb);
- /* FIXME: This is misplaced; mention() is called by things (like hitting a
- watchpoint) other than breakpoint creation. It should be possible to
- clean this up and at the same time replace the random calls to
- breakpoint_changed with this hook, as has already been done for
- delete_breakpoint_hook and so on. */
- if (create_breakpoint_hook)
- create_breakpoint_hook (b);
+ /* FIXME: This is misplaced; mention() is called by things (like
+ hitting a watchpoint) other than breakpoint creation. It should
+ be possible to clean this up and at the same time replace the
+ random calls to breakpoint_changed with this hook, as has already
+ been done for deprecated_delete_breakpoint_hook and so on. */
+ if (deprecated_create_breakpoint_hook)
+ deprecated_create_breakpoint_hook (b);
breakpoint_create_event (b->number);
if (b->ops != NULL && b->ops->print_mention != NULL)
if (bpt->type == bp_none)
return;
- if (delete_breakpoint_hook)
- delete_breakpoint_hook (bpt);
+ if (deprecated_delete_breakpoint_hook)
+ deprecated_delete_breakpoint_hook (bpt);
breakpoint_delete_event (bpt->number);
if (bpt->loc->inserted)
check_duplicates (bpt);
- if (modify_breakpoint_hook)
- modify_breakpoint_hook (bpt);
+ if (deprecated_modify_breakpoint_hook)
+ deprecated_modify_breakpoint_hook (bpt);
breakpoint_modify_event (bpt->number);
}
}
}
- if (modify_breakpoint_hook)
- modify_breakpoint_hook (bpt);
+ if (deprecated_modify_breakpoint_hook)
+ deprecated_modify_breakpoint_hook (bpt);
breakpoint_modify_event (bpt->number);
}
error ("Control nesting too deep!\n");
/* Set a prompt based on the nesting of the control commands. */
- if (instream == stdin || (instream == 0 && readline_hook != NULL))
+ if (instream == stdin || (instream == 0 && deprecated_readline_hook != NULL))
{
for (i = 0; i < control_level; i++)
control_prompt[i] = ' ';
enum misc_command_type val;
control_level = 0;
- if (readline_begin_hook)
+ if (deprecated_readline_begin_hook)
{
/* Note - intentional to merge messages with no newline */
- (*readline_begin_hook) ("%s %s\n", prompt_arg, END_MESSAGE);
+ (*deprecated_readline_begin_hook) ("%s %s\n", prompt_arg, END_MESSAGE);
}
else if (from_tty && input_from_terminal_p ())
{
do_cleanups (old_chain);
}
- if (readline_end_hook)
+ if (deprecated_readline_end_hook)
{
- (*readline_end_hook) ();
+ (*deprecated_readline_end_hook) ();
}
return (head);
}
else
error ("gdb internal error: bad cmd_type in do_setshow_command");
c->func (c, NULL, from_tty);
- if (c->type == set_cmd && set_hook)
- set_hook (c);
+ if (c->type == set_cmd && deprecated_set_hook)
+ deprecated_set_hook (c);
}
/* Show all the settings in a list of show commands. */
if (complaint->file != NULL)
internal_vwarning (complaint->file, complaint->line, complaint->fmt, args);
- else if (warning_hook)
- (*warning_hook) (complaint->fmt, args);
+ else if (deprecated_warning_hook)
+ (*deprecated_warning_hook) (complaint->fmt, args);
else
{
if (complaints->explanation == NULL)
extern void _initialize_core (void);
static void call_extra_exec_file_hooks (char *filename);
-/* You can have any number of hooks for `exec_file_command' command to call.
- If there's only one hook, it is set in exec_file_display hook.
- If there are two or more hooks, they are set in exec_file_extra_hooks[],
- and exec_file_display_hook is set to a function that calls all of them.
- This extra complexity is needed to preserve compatibility with
- old code that assumed that only one hook could be set, and which called
- exec_file_display_hook directly. */
+/* You can have any number of hooks for `exec_file_command' command to
+ call. If there's only one hook, it is set in exec_file_display
+ hook. If there are two or more hooks, they are set in
+ exec_file_extra_hooks[], and deprecated_exec_file_display_hook is
+ set to a function that calls all of them. This extra complexity is
+ needed to preserve compatibility with old code that assumed that
+ only one hook could be set, and which called
+ deprecated_exec_file_display_hook directly. */
typedef void (*hook_type) (char *);
-hook_type exec_file_display_hook; /* the original hook */
+hook_type deprecated_exec_file_display_hook; /* the original hook */
static hook_type *exec_file_extra_hooks; /* array of additional hooks */
static int exec_file_hook_count = 0; /* size of array */
{
hook_type *new_array;
- if (exec_file_display_hook != NULL)
+ if (deprecated_exec_file_display_hook != NULL)
{
/* There's already a hook installed. Arrange to have both it
* and the subsequent hooks called. */
{
/* If this is the first extra hook, initialize the hook array. */
exec_file_extra_hooks = (hook_type *) xmalloc (sizeof (hook_type));
- exec_file_extra_hooks[0] = exec_file_display_hook;
- exec_file_display_hook = call_extra_exec_file_hooks;
+ exec_file_extra_hooks[0] = deprecated_exec_file_display_hook;
+ deprecated_exec_file_display_hook = call_extra_exec_file_hooks;
exec_file_hook_count = 1;
}
exec_file_extra_hooks[exec_file_hook_count - 1] = hook;
}
else
- exec_file_display_hook = hook;
+ deprecated_exec_file_display_hook = hook;
}
/* The exec file must be closed before running an inferior.
{
register_gdbarch_init (bfd_arch_d10v, d10v_gdbarch_init);
- target_resume_hook = d10v_eva_prepare_to_trace;
- target_wait_loop_hook = d10v_eva_get_trace_data;
+ deprecated_target_resume_hook = d10v_eva_prepare_to_trace;
+ deprecated_target_wait_loop_hook = d10v_eva_get_trace_data;
deprecate_cmd (add_com ("regs", class_vars, show_regs,
"Print all registers"),
#else
#define QUIT { \
if (quit_flag) quit (); \
- if (interactive_hook) interactive_hook (); \
+ if (deprecated_interactive_hook) deprecated_interactive_hook (); \
}
#endif
extern char *interpreter_p;
/* If a given interpreter matches INTERPRETER_P then it should update
- command_loop_hook and init_ui_hook with the per-interpreter
- implementation. */
-/* FIXME: command_loop_hook and init_ui_hook should be moved here. */
+ deprecated_command_loop_hook and deprecated_init_ui_hook with the
+ per-interpreter implementation. */
+/* FIXME: deprecated_command_loop_hook and deprecated_init_ui_hook
+ should be moved here. */
struct target_waitstatus;
struct cmd_list_element;
event-loop) be enabled? */
extern int event_loop_p;
-extern void (*init_ui_hook) (char *argv0);
-extern void (*command_loop_hook) (void);
-extern void (*show_load_progress) (const char *section,
- unsigned long section_sent,
- unsigned long section_size,
- unsigned long total_sent,
- unsigned long total_size);
-extern void (*print_frame_info_listing_hook) (struct symtab * s,
- int line, int stopline,
- int noerror);
+extern void (*deprecated_init_ui_hook) (char *argv0);
+extern void (*deprecated_command_loop_hook) (void);
+extern void (*deprecated_show_load_progress) (const char *section,
+ unsigned long section_sent,
+ unsigned long section_size,
+ unsigned long total_sent,
+ unsigned long total_size);
+extern void (*deprecated_print_frame_info_listing_hook) (struct symtab * s,
+ int line, int stopline,
+ int noerror);
extern struct frame_info *parse_frame_specification (char *frame_exp);
-extern int (*query_hook) (const char *, va_list);
-extern void (*warning_hook) (const char *, va_list);
-extern void (*flush_hook) (struct ui_file * stream);
-extern void (*create_breakpoint_hook) (struct breakpoint * b);
-extern void (*delete_breakpoint_hook) (struct breakpoint * bpt);
-extern void (*modify_breakpoint_hook) (struct breakpoint * bpt);
-extern void (*interactive_hook) (void);
-extern void (*registers_changed_hook) (void);
-extern void (*readline_begin_hook) (char *,...);
-extern char *(*readline_hook) (char *);
-extern void (*readline_end_hook) (void);
-extern void (*register_changed_hook) (int regno);
-extern void (*memory_changed_hook) (CORE_ADDR addr, int len);
-extern void (*context_hook) (int);
-extern ptid_t (*target_wait_hook) (ptid_t ptid,
+extern int (*deprecated_query_hook) (const char *, va_list);
+extern void (*deprecated_warning_hook) (const char *, va_list);
+extern void (*deprecated_flush_hook) (struct ui_file * stream);
+extern void (*deprecated_create_breakpoint_hook) (struct breakpoint * b);
+extern void (*deprecated_delete_breakpoint_hook) (struct breakpoint * bpt);
+extern void (*deprecated_modify_breakpoint_hook) (struct breakpoint * bpt);
+extern void (*deprecated_interactive_hook) (void);
+extern void (*deprecated_registers_changed_hook) (void);
+extern void (*deprecated_readline_begin_hook) (char *,...);
+extern char *(*deprecated_readline_hook) (char *);
+extern void (*deprecated_readline_end_hook) (void);
+extern void (*deprecated_register_changed_hook) (int regno);
+extern void (*deprecated_memory_changed_hook) (CORE_ADDR addr, int len);
+extern void (*deprecated_context_hook) (int);
+extern ptid_t (*deprecated_target_wait_hook) (ptid_t ptid,
struct target_waitstatus * status);
-extern void (*attach_hook) (void);
-extern void (*detach_hook) (void);
-extern void (*call_command_hook) (struct cmd_list_element * c,
- char *cmd, int from_tty);
+extern void (*deprecated_attach_hook) (void);
+extern void (*deprecated_detach_hook) (void);
+extern void (*deprecated_call_command_hook) (struct cmd_list_element * c,
+ char *cmd, int from_tty);
-extern void (*set_hook) (struct cmd_list_element * c);
+extern void (*deprecated_set_hook) (struct cmd_list_element * c);
-extern NORETURN void (*error_hook) (void) ATTR_NORETURN;
+extern NORETURN void (*deprecated_error_hook) (void) ATTR_NORETURN;
-extern void (*error_begin_hook) (void);
+extern void (*deprecated_error_begin_hook) (void);
-extern int (*ui_load_progress_hook) (const char *section, unsigned long num);
+extern int (*deprecated_ui_load_progress_hook) (const char *section,
+ unsigned long num);
/* Inhibit window interface if non-zero. */
do
{
serial_write (desc, srec, reclen);
- if (ui_load_progress_hook)
- if (ui_load_progress_hook (section_name, (unsigned long) i))
+ if (deprecated_ui_load_progress_hook)
+ if (deprecated_ui_load_progress_hook (section_name,
+ (unsigned long) i))
error ("Canceled the download");
}
while (waitack != NULL && !waitack ());
}
} /* Per-packet (or S-record) loop */
- if (ui_load_progress_hook)
- if (ui_load_progress_hook (section_name, (unsigned long) i))
+ if (deprecated_ui_load_progress_hook)
+ if (deprecated_ui_load_progress_hook (section_name,
+ (unsigned long) i))
error ("Canceled the download");
putchar_unfiltered ('\n');
}
struct vmap *map_vmap (bfd *, bfd *);
-void (*file_changed_hook) (char *);
+void (*deprecated_file_changed_hook) (char *);
/* Prototypes for local functions */
push_target (&exec_ops);
/* Tell display code (if any) about the changed file name. */
- if (exec_file_display_hook)
- (*exec_file_display_hook) (filename);
+ if (deprecated_exec_file_display_hook)
+ (*deprecated_exec_file_display_hook) (filename);
}
}
the exec file, but that's rough. */
exec_file_command (arg, from_tty);
symbol_file_command (arg, from_tty);
- if (file_changed_hook)
- file_changed_hook (arg);
+ if (deprecated_file_changed_hook)
+ deprecated_file_changed_hook (arg);
}
\f
deprecated_selected_frame = fi;
/* NOTE: cagney/2002-05-04: FI can be NULL. This occurs when the
frame is being invalidated. */
- if (selected_frame_level_changed_hook)
- selected_frame_level_changed_hook (frame_relative_level (fi));
+ if (deprecated_selected_frame_level_changed_hook)
+ deprecated_selected_frame_level_changed_hook (frame_relative_level (fi));
/* FIXME: kseitz/2002-08-28: It would be nice to call
selected_frame_level_changed_event() right here, but due to limitations
extern void locals_info (char *, int);
-extern void (*selected_frame_level_changed_hook) (int);
+extern void (*deprecated_selected_frame_level_changed_hook) (int);
extern void return_command (char *, int);
\f
/* Hook for `exec_file_command' command to call. */
-extern void (*exec_file_display_hook) (char *filename);
+extern void (*deprecated_exec_file_display_hook) (char *filename);
/* Hook for "file_command", which is more useful than above
(because it is invoked AFTER symbols are read, not before) */
-extern void (*file_changed_hook) (char *filename);
+extern void (*deprecated_file_changed_hook) (char *filename);
extern void specify_exec_file_hook (void (*hook) (char *filename));
child_suppress_run = 1;
/* Hook into new_objfile notification. */
- target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = hpux_thread_new_objfile;
+ target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = hpux_thread_new_objfile;
}
normal_stop ();
- if (attach_hook)
- attach_hook ();
+ if (deprecated_attach_hook)
+ deprecated_attach_hook ();
}
/*
#if defined(SOLIB_RESTART)
SOLIB_RESTART ();
#endif
- if (detach_hook)
- detach_hook ();
+ if (deprecated_detach_hook)
+ deprecated_detach_hook ();
}
/* Disconnect from the current target without resuming it (leaving it
#if defined(SOLIB_RESTART)
SOLIB_RESTART ();
#endif
- if (detach_hook)
- detach_hook ();
+ if (deprecated_detach_hook)
+ deprecated_detach_hook ();
}
/* Stop the execution of the target while running in async mode, in
static int number_of_threads_in_syscalls;
/* This is a cached copy of the pid/waitstatus of the last event
- returned by target_wait()/target_wait_hook(). This information is
- returned by get_last_target_status(). */
+ returned by target_wait()/deprecated_target_wait_hook(). This
+ information is returned by get_last_target_status(). */
static ptid_t target_last_wait_ptid;
static struct target_waitstatus target_last_waitstatus;
while (1)
{
- if (target_wait_hook)
- ecs->ptid = target_wait_hook (ecs->waiton_ptid, ecs->wp);
+ if (deprecated_target_wait_hook)
+ ecs->ptid = deprecated_target_wait_hook (ecs->waiton_ptid, ecs->wp);
else
ecs->ptid = target_wait (ecs->waiton_ptid, ecs->wp);
registers_changed ();
}
- if (target_wait_hook)
+ if (deprecated_target_wait_hook)
async_ecs->ptid =
- target_wait_hook (async_ecs->waiton_ptid, async_ecs->wp);
+ deprecated_target_wait_hook (async_ecs->waiton_ptid, async_ecs->wp);
else
async_ecs->ptid = target_wait (async_ecs->waiton_ptid, async_ecs->wp);
}
/* Return the cached copy of the last pid/waitstatus returned by
- target_wait()/target_wait_hook(). The data is actually cached by
- handle_inferior_event(), which gets called immediately after
- target_wait()/target_wait_hook(). */
+ target_wait()/deprecated_target_wait_hook(). The data is actually
+ cached by handle_inferior_event(), which gets called immediately
+ after target_wait()/deprecated_target_wait_hook(). */
void
get_last_target_status (ptid_t *ptidp, struct target_waitstatus *status)
ecs->ptid = saved_singlestep_ptid;
context_switch (ecs);
- if (context_hook)
- context_hook (pid_to_thread_id (ecs->ptid));
+ if (deprecated_context_hook)
+ deprecated_context_hook (pid_to_thread_id (ecs->ptid));
resume (1, TARGET_SIGNAL_0);
prepare_to_wait (ecs);
{
context_switch (ecs);
- if (context_hook)
- context_hook (pid_to_thread_id (ecs->ptid));
+ if (deprecated_context_hook)
+ deprecated_context_hook (pid_to_thread_id (ecs->ptid));
flush_cached_frames ();
}
current_interp_command_loop (void)
{
/* Somewhat messy. For the moment prop up all the old ways of
- selecting the command loop. `command_loop_hook' should be
- deprecated. */
- if (command_loop_hook != NULL)
- command_loop_hook ();
+ selecting the command loop. `deprecated_command_loop_hook'
+ should be deprecated. */
+ if (deprecated_command_loop_hook != NULL)
+ deprecated_command_loop_hook ();
else if (current_interpreter != NULL
&& current_interpreter->procs->command_loop_proc != NULL)
current_interpreter->procs->command_loop_proc (current_interpreter->data);
void
clear_interpreter_hooks (void)
{
- init_ui_hook = 0;
- print_frame_info_listing_hook = 0;
+ deprecated_init_ui_hook = 0;
+ deprecated_print_frame_info_listing_hook = 0;
/*print_frame_more_info_hook = 0; */
- query_hook = 0;
- warning_hook = 0;
- create_breakpoint_hook = 0;
- delete_breakpoint_hook = 0;
- modify_breakpoint_hook = 0;
- interactive_hook = 0;
- registers_changed_hook = 0;
- readline_begin_hook = 0;
- readline_hook = 0;
- readline_end_hook = 0;
- register_changed_hook = 0;
- memory_changed_hook = 0;
- context_hook = 0;
- target_wait_hook = 0;
- call_command_hook = 0;
- error_hook = 0;
- error_begin_hook = 0;
- command_loop_hook = 0;
+ deprecated_query_hook = 0;
+ deprecated_warning_hook = 0;
+ deprecated_create_breakpoint_hook = 0;
+ deprecated_delete_breakpoint_hook = 0;
+ deprecated_modify_breakpoint_hook = 0;
+ deprecated_interactive_hook = 0;
+ deprecated_registers_changed_hook = 0;
+ deprecated_readline_begin_hook = 0;
+ deprecated_readline_hook = 0;
+ deprecated_readline_end_hook = 0;
+ deprecated_register_changed_hook = 0;
+ deprecated_memory_changed_hook = 0;
+ deprecated_context_hook = 0;
+ deprecated_target_wait_hook = 0;
+ deprecated_call_command_hook = 0;
+ deprecated_error_hook = 0;
+ deprecated_error_begin_hook = 0;
+ deprecated_command_loop_hook = 0;
clear_gdb_event_hooks ();
}
}
/* Initialize all files. Give the interpreter a chance to take
- control of the console via the init_ui_hook()) */
+ control of the console via the deprecated_init_ui_hook(). */
gdb_init (argv[0]);
/* Do these (and anything which might call wrap_here or *_filtered)
/* GUIs generally have their own command loop, mainloop, or whatever.
This is a good place to gain control because many error
conditions will end up here via longjmp(). */
- if (command_loop_hook)
- command_loop_hook ();
+ if (deprecated_command_loop_hook)
+ deprecated_command_loop_hook ();
else
- command_loop ();
+ deprecated_command_loop ();
quit_command ((char *) 0, instream == stdin);
}
}
be a better way of doing this... */
clear_interpreter_hooks ();
- show_load_progress = mi_load_progress;
+ deprecated_show_load_progress = mi_load_progress;
/* If we're _the_ interpreter, take control. */
if (current_interp_named_p (INTERP_MI1))
- command_loop_hook = mi1_command_loop;
+ deprecated_command_loop_hook = mi1_command_loop;
else if (current_interp_named_p (INTERP_MI2))
- command_loop_hook = mi2_command_loop;
+ deprecated_command_loop_hook = mi2_command_loop;
else if (current_interp_named_p (INTERP_MI3))
- command_loop_hook = mi3_command_loop;
+ deprecated_command_loop_hook = mi3_command_loop;
else
- command_loop_hook = mi2_command_loop;
+ deprecated_command_loop_hook = mi2_command_loop;
return 1;
}
static void
mi_insert_notify_hooks (void)
{
- query_hook = mi_interp_query_hook;
+ deprecated_query_hook = mi_interp_query_hook;
}
static void
mi_remove_notify_hooks (void)
{
- query_hook = NULL;
+ deprecated_query_hook = NULL;
}
static int
uiout = mi_out_new (mi_version);
/* HACK: Override any other interpreter hooks. We need to create a
real event table and pass in that. */
- init_ui_hook = 0;
- /* command_loop_hook = 0; */
- print_frame_info_listing_hook = 0;
- query_hook = 0;
- warning_hook = 0;
- create_breakpoint_hook = 0;
- delete_breakpoint_hook = 0;
- modify_breakpoint_hook = 0;
- interactive_hook = 0;
- registers_changed_hook = 0;
- readline_begin_hook = 0;
- readline_hook = 0;
- readline_end_hook = 0;
- register_changed_hook = 0;
- memory_changed_hook = 0;
- context_hook = 0;
- target_wait_hook = 0;
- call_command_hook = 0;
- error_hook = 0;
- error_begin_hook = 0;
- show_load_progress = mi_load_progress;
+ deprecated_init_ui_hook = 0;
+ /* deprecated_command_loop_hook = 0; */
+ deprecated_print_frame_info_listing_hook = 0;
+ deprecated_query_hook = 0;
+ deprecated_warning_hook = 0;
+ deprecated_create_breakpoint_hook = 0;
+ deprecated_delete_breakpoint_hook = 0;
+ deprecated_modify_breakpoint_hook = 0;
+ deprecated_interactive_hook = 0;
+ deprecated_registers_changed_hook = 0;
+ deprecated_readline_begin_hook = 0;
+ deprecated_readline_hook = 0;
+ deprecated_readline_end_hook = 0;
+ deprecated_register_changed_hook = 0;
+ deprecated_memory_changed_hook = 0;
+ deprecated_context_hook = 0;
+ deprecated_target_wait_hook = 0;
+ deprecated_call_command_hook = 0;
+ deprecated_error_hook = 0;
+ deprecated_error_begin_hook = 0;
+ deprecated_show_load_progress = mi_load_progress;
#endif
/* Turn off 8 bit strings in quoted output. Any character with the
high bit set is printed using C's octal format. */
for (i = 0; i < current_regcache->descr->nr_raw_registers; i++)
set_register_cached (i, 0);
- if (registers_changed_hook)
- registers_changed_hook ();
+ if (deprecated_registers_changed_hook)
+ deprecated_registers_changed_hook ();
}
/* DEPRECATED_REGISTERS_FETCHED ()
reclen = mips_make_srec (srec, '3', s->vma + i, buffer, numbytes);
send_srec (srec, reclen, s->vma + i);
- if (ui_load_progress_hook)
- ui_load_progress_hook (s->name, i);
+ if (deprecated_ui_load_progress_hook)
+ deprecated_ui_load_progress_hook (s->name, i);
if (hashmark)
{
break;
}
- if (ui_load_progress_hook)
- ui_load_progress_hook (s->name, i);
+ if (deprecated_ui_load_progress_hook)
+ deprecated_ui_load_progress_hook (s->name, i);
if (hashmark)
{
static void
gdb_os_error (host_callback * p, const char *format,...)
{
- if (error_hook)
- (*error_hook) ();
+ if (deprecated_error_hook)
+ (*deprecated_error_hook) ();
else
{
va_list args;
/* These are pointers to hook functions that may be set in order to
modify resume/wait behavior for a particular architecture. */
-void (*target_resume_hook) (void);
-void (*target_wait_loop_hook) (void);
+void (*deprecated_target_resume_hook) (void);
+void (*deprecated_target_wait_loop_hook) (void);
\f
/* A hook for when we need to do something at the last moment before
resumption. */
- if (target_resume_hook)
- (*target_resume_hook) ();
+ if (deprecated_target_resume_hook)
+ (*deprecated_target_resume_hook) ();
/* The vCont packet doesn't need to specify threads via Hc. */
if (remote_vcont_resume (ptid, step, siggnal))
/* This is a hook for when we need to do something (perhaps the
collection of trace data) every time the target stops. */
- if (target_wait_loop_hook)
- (*target_wait_loop_hook) ();
+ if (deprecated_target_wait_loop_hook)
+ (*deprecated_target_wait_loop_hook) ();
remote_stopped_by_watchpoint_p = 0;
/* This is a hook for when we need to do something (perhaps the
collection of trace data) every time the target stops. */
- if (target_wait_loop_hook)
- (*target_wait_loop_hook) ();
+ if (deprecated_target_wait_loop_hook)
+ (*deprecated_target_wait_loop_hook) ();
switch (buf[0])
{
add_target (&extended_async_remote_ops);
/* Hook into new objfile notification. */
- remote_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = remote_new_objfile;
+ remote_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = remote_new_objfile;
#if 0
init_remote_threadtests ();
extern int remote_read_bytes (CORE_ADDR memaddr, char *myaddr, int len);
-extern void (*target_resume_hook) (void);
-extern void (*target_wait_loop_hook) (void);
+extern void (*deprecated_target_resume_hook) (void);
+extern void (*deprecated_target_wait_loop_hook) (void);
#endif
/* Announce new object files. Doing this after symbol relocation
makes aix-thread.c's job easier. */
- if (target_new_objfile_hook && vp->objfile)
- target_new_objfile_hook (vp->objfile);
+ if (deprecated_target_new_objfile_hook && vp->objfile)
+ deprecated_target_new_objfile_hook (vp->objfile);
/* There may be more, so we don't break out of the loop. */
}
vmap_symtab (vp);
- if (target_new_objfile_hook && vp != vmap && vp->objfile)
- target_new_objfile_hook (vp->objfile);
+ if (deprecated_target_new_objfile_hook && vp != vmap && vp->objfile)
+ deprecated_target_new_objfile_hook (vp->objfile);
}
while (LDI_NEXT (ldi, arch64) != 0);
vmap_exec ();
add_target (&core_ops);
/* Hook into new_objfile notification. */
- target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = sol_thread_new_objfile;
+ target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = sol_thread_new_objfile;
return;
die:
void locals_info (char *, int);
-void (*selected_frame_level_changed_hook) (int);
+void (*deprecated_selected_frame_level_changed_hook) (int);
void _initialize_stack (void);
get_frame_pc (fi));
if (!done)
{
- if (print_frame_info_listing_hook)
- print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
+ if (deprecated_print_frame_info_listing_hook)
+ deprecated_print_frame_info_listing_hook (sal.symtab, sal.line, sal.line + 1, 0);
else
{
/* We used to do this earlier, but that is clearly
} while (0)
#endif
-int (*ui_load_progress_hook) (const char *section, unsigned long num);
-void (*show_load_progress) (const char *section,
+int (*deprecated_ui_load_progress_hook) (const char *section, unsigned long num);
+void (*deprecated_show_load_progress) (const char *section,
unsigned long section_sent,
unsigned long section_size,
unsigned long total_sent,
unsigned long total_size);
void (*pre_add_symbol_hook) (const char *);
void (*post_add_symbol_hook) (void);
-void (*target_new_objfile_hook) (struct objfile *);
+void (*deprecated_target_new_objfile_hook) (struct objfile *);
static void clear_symtab_users_cleanup (void *ignore);
new_symfile_objfile (objfile, mainline, from_tty);
- if (target_new_objfile_hook)
- target_new_objfile_hook (objfile);
+ if (deprecated_target_new_objfile_hook)
+ deprecated_target_new_objfile_hook (objfile);
return (objfile);
}
args->write_count += 1;
sent += len;
if (quit_flag
- || (ui_load_progress_hook != NULL
- && ui_load_progress_hook (sect_name, sent)))
+ || (deprecated_ui_load_progress_hook != NULL
+ && deprecated_ui_load_progress_hook (sect_name, sent)))
error ("Canceled the download");
- if (show_load_progress != NULL)
- show_load_progress (sect_name, sent, size,
- args->data_count, args->total_size);
+ if (deprecated_show_load_progress != NULL)
+ deprecated_show_load_progress (sect_name, sent, size,
+ args->data_count,
+ args->total_size);
}
while (sent < size);
set_default_breakpoint (0, 0, 0, 0);
clear_current_source_symtab_and_line ();
clear_pc_function_cache ();
- if (target_new_objfile_hook)
- target_new_objfile_hook (NULL);
+ if (deprecated_target_new_objfile_hook)
+ deprecated_target_new_objfile_hook (NULL);
}
static void
if (!show_breakpoint_hit_counts)
breakpoint_clear_ignore_counts ();
- if (detach_hook)
- detach_hook ();
+ if (deprecated_detach_hook)
+ deprecated_detach_hook ();
}
\f
/* Helper function for child_wait and the Lynx derivatives of child_wait.
* The old way of doing this is to define a macro 'target_new_objfile'
* that points to the function that you want to be called on every
* objfile/shlib load.
- *
- * The new way is to grab the function pointer, 'target_new_objfile_hook',
- * and point it to the function that you want to be called on every
- * objfile/shlib load.
- *
- * If multiple clients are willing to be cooperative, they can each
- * save a pointer to the previous value of target_new_objfile_hook
- * before modifying it, and arrange for their function to call the
- * previous function in the chain. In that way, multiple clients
- * can receive this notification (something like with signal handlers).
- */
-extern void (*target_new_objfile_hook) (struct objfile *);
+ The new way is to grab the function pointer,
+ 'deprecated_target_new_objfile_hook', and point it to the function
+ that you want to be called on every objfile/shlib load.
+
+ If multiple clients are willing to be cooperative, they can each
+ save a pointer to the previous value of
+ deprecated_target_new_objfile_hook before modifying it, and arrange
+ for their function to call the previous function in the chain. In
+ that way, multiple clients can receive this notification (something
+ like with signal handlers). */
+
+extern void (*deprecated_target_new_objfile_hook) (struct objfile *);
#ifndef target_pid_or_tid_to_str
#define target_pid_or_tid_to_str(ID) \
add_target (&thread_db_ops);
/* Add ourselves to objfile event chain. */
- target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = thread_db_new_objfile;
+ target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = thread_db_new_objfile;
}
}
If the UI fails to initialize and it wants GDB to continue
using the default UI, then it should clear this hook before returning. */
-void (*init_ui_hook) (char *argv0);
+void (*deprecated_init_ui_hook) (char *argv0);
/* This hook is called from within gdb's many mini-event loops which could
steal control from a real user interface's event loop. It returns
/* Called instead of command_loop at top level. Can be invoked via
throw_exception(). */
-void (*command_loop_hook) (void);
+void (*deprecated_command_loop_hook) (void);
/* Called from print_frame_info to list the line we stopped in. */
-void (*print_frame_info_listing_hook) (struct symtab * s, int line,
- int stopline, int noerror);
+void (*deprecated_print_frame_info_listing_hook) (struct symtab * s, int line,
+ int stopline, int noerror);
/* Replaces most of query. */
-int (*query_hook) (const char *, va_list);
+int (*deprecated_query_hook) (const char *, va_list);
/* Replaces most of warning. */
-void (*warning_hook) (const char *, va_list);
+void (*deprecated_warning_hook) (const char *, va_list);
-/* These three functions support getting lines of text from the user. They
- are used in sequence. First readline_begin_hook is called with a text
- string that might be (for example) a message for the user to type in a
- sequence of commands to be executed at a breakpoint. If this function
- calls back to a GUI, it might take this opportunity to pop up a text
- interaction window with this message. Next, readline_hook is called
- with a prompt that is emitted prior to collecting the user input.
- It can be called multiple times. Finally, readline_end_hook is called
- to notify the GUI that we are done with the interaction window and it
- can close it. */
+/* These three functions support getting lines of text from the user.
+ They are used in sequence. First deprecated_readline_begin_hook is
+ called with a text string that might be (for example) a message for
+ the user to type in a sequence of commands to be executed at a
+ breakpoint. If this function calls back to a GUI, it might take
+ this opportunity to pop up a text interaction window with this
+ message. Next, deprecated_readline_hook is called with a prompt
+ that is emitted prior to collecting the user input. It can be
+ called multiple times. Finally, deprecated_readline_end_hook is
+ called to notify the GUI that we are done with the interaction
+ window and it can close it. */
-void (*readline_begin_hook) (char *, ...);
-char *(*readline_hook) (char *);
-void (*readline_end_hook) (void);
+void (*deprecated_readline_begin_hook) (char *, ...);
+char *(*deprecated_readline_hook) (char *);
+void (*deprecated_readline_end_hook) (void);
/* Called as appropriate to notify the interface of the specified breakpoint
conditions. */
-void (*create_breakpoint_hook) (struct breakpoint * bpt);
-void (*delete_breakpoint_hook) (struct breakpoint * bpt);
-void (*modify_breakpoint_hook) (struct breakpoint * bpt);
+void (*deprecated_create_breakpoint_hook) (struct breakpoint * bpt);
+void (*deprecated_delete_breakpoint_hook) (struct breakpoint * bpt);
+void (*deprecated_modify_breakpoint_hook) (struct breakpoint * bpt);
/* Called as appropriate to notify the interface that we have attached
to or detached from an already running process. */
-void (*attach_hook) (void);
-void (*detach_hook) (void);
+void (*deprecated_attach_hook) (void);
+void (*deprecated_detach_hook) (void);
/* Called during long calculations to allow GUI to repair window damage, and to
check for stop buttons, etc... */
-void (*interactive_hook) (void);
+void (*deprecated_interactive_hook) (void);
/* Called when the registers have changed, as a hint to a GUI
to minimize window update. */
-void (*registers_changed_hook) (void);
+void (*deprecated_registers_changed_hook) (void);
/* Tell the GUI someone changed the register REGNO. -1 means
that the caller does not know which register changed or
that several registers have changed (see value_assign). */
-void (*register_changed_hook) (int regno);
+void (*deprecated_register_changed_hook) (int regno);
/* Tell the GUI someone changed LEN bytes of memory at ADDR */
-void (*memory_changed_hook) (CORE_ADDR addr, int len);
+void (*deprecated_memory_changed_hook) (CORE_ADDR addr, int len);
/* Called when going to wait for the target. Usually allows the GUI to run
while waiting for target events. */
-ptid_t (*target_wait_hook) (ptid_t ptid,
- struct target_waitstatus * status);
+ptid_t (*deprecated_target_wait_hook) (ptid_t ptid,
+ struct target_waitstatus * status);
/* Used by UI as a wrapper around command execution. May do various things
like enabling/disabling buttons, etc... */
-void (*call_command_hook) (struct cmd_list_element * c, char *cmd,
- int from_tty);
+void (*deprecated_call_command_hook) (struct cmd_list_element * c, char *cmd,
+ int from_tty);
/* Called after a `set' command has finished. Is only run if the
`set' command succeeded. */
-void (*set_hook) (struct cmd_list_element * c);
+void (*deprecated_set_hook) (struct cmd_list_element * c);
/* Called when the current thread changes. Argument is thread id. */
-void (*context_hook) (int id);
+void (*deprecated_context_hook) (int id);
/* Takes control from error (). Typically used to prevent longjmps out of the
middle of the GUI. Usually used in conjunction with a catch routine. */
-NORETURN void (*error_hook) (void) ATTR_NORETURN;
+NORETURN void (*deprecated_error_hook) (void) ATTR_NORETURN;
\f
/* One should use catch_errors rather than manipulating these
do_setshow_command (arg, from_tty & caution, c);
else if (!cmd_func_p (c))
error ("That is not a command, just a help topic.");
- else if (call_command_hook)
- call_command_hook (c, arg, from_tty & caution);
+ else if (deprecated_call_command_hook)
+ deprecated_call_command_hook (c, arg, from_tty & caution);
else
cmd_func (c, arg, from_tty & caution);
}
/* Don't use fancy stuff if not talking to stdin. */
- if (readline_hook && instream == NULL)
+ if (deprecated_readline_hook && instream == NULL)
{
- rl = (*readline_hook) (local_prompt);
+ rl = (*deprecated_readline_hook) (local_prompt);
}
else if (command_editing_p && instream == stdin && ISATTY (instream))
{
/* This is something of a hack. But there's no reliable way to
see if a GUI is running. The `use_windows' variable doesn't
cut it. */
- if (init_ui_hook)
+ if (deprecated_init_ui_hook)
s = "A debugging session is active.\nDo you still want to close the debugger?";
else if (attach_flag)
s = "The program is running. Quit anyway (and detach it)? ";
set_language (language_c);
expected_language = current_language; /* don't warn about the change. */
- /* Allow another UI to initialize. If the UI fails to initialize, and
- it wants GDB to revert to the CLI, it should clear init_ui_hook. */
- if (init_ui_hook)
- init_ui_hook (argv0);
+ /* Allow another UI to initialize. If the UI fails to initialize,
+ and it wants GDB to revert to the CLI, it should clear
+ deprecated_init_ui_hook. */
+ if (deprecated_init_ui_hook)
+ deprecated_init_ui_hook (argv0);
}
#define MAX_AGENT_EXPR_LEN 184
-extern void (*readline_begin_hook) (char *, ...);
-extern char *(*readline_hook) (char *);
-extern void (*readline_end_hook) (void);
+extern void (*deprecated_readline_begin_hook) (char *, ...);
+extern char *(*deprecated_readline_hook) (char *);
+extern void (*deprecated_readline_end_hook) (void);
extern void x_command (char *, int);
extern int addressprint; /* Print machine addresses? */
if (from_tty)
{
- if (readline_begin_hook)
- (*readline_begin_hook) ("%s %s\n", tmpbuf, end_msg);
+ if (deprecated_readline_begin_hook)
+ (*deprecated_readline_begin_hook) ("%s %s\n", tmpbuf, end_msg);
else if (input_from_terminal_p ())
printf_filtered ("%s\n%s\n", tmpbuf, end_msg);
}
t->step_count = 0; /* read_actions may set this */
read_actions (t);
- if (readline_end_hook)
- (*readline_end_hook) ();
+ if (deprecated_readline_end_hook)
+ (*deprecated_readline_end_hook) ();
/* tracepoints_changed () */
}
/* else just return */
gdb_flush (gdb_stdout);
gdb_flush (gdb_stderr);
- if (readline_hook && instream == NULL)
- line = (*readline_hook) (prompt);
+ if (deprecated_readline_hook && instream == NULL)
+ line = (*deprecated_readline_hook) (prompt);
else if (instream == stdin && ISATTY (instream))
{
line = gdb_readline_wrapper (prompt);
set_tracepoint_num (-1);
set_traceframe_context (-1);
trace_running_p = 1;
- if (trace_start_stop_hook)
- trace_start_stop_hook (1, from_tty);
+ if (deprecated_trace_start_stop_hook)
+ deprecated_trace_start_stop_hook (1, from_tty);
}
else
if (strcmp (target_buf, "OK"))
error ("Bogus reply from target: %s", target_buf);
trace_running_p = 0;
- if (trace_start_stop_hook)
- trace_start_stop_hook (0, from_tty);
+ if (deprecated_trace_start_stop_hook)
+ deprecated_trace_start_stop_hook (0, from_tty);
}
else
error ("Trace can only be run on remote targets.");
if (target_is_remote ())
{
- if (trace_find_hook)
- trace_find_hook (args, from_tty);
+ if (deprecated_trace_find_hook)
+ deprecated_trace_find_hook (args, from_tty);
if (args == 0 || *args == 0)
{ /* TFIND with no args means find NEXT trace frame. */
/* A hook used to notify the UI of tracepoint operations */
-void (*create_tracepoint_hook) (struct tracepoint *);
-void (*delete_tracepoint_hook) (struct tracepoint *);
-void (*modify_tracepoint_hook) (struct tracepoint *);
-void (*trace_find_hook) (char *arg, int from_tty);
-void (*trace_start_stop_hook) (int start, int from_tty);
+void (*deprecated_create_tracepoint_hook) (struct tracepoint *);
+void (*deprecated_delete_tracepoint_hook) (struct tracepoint *);
+void (*deprecated_modify_tracepoint_hook) (struct tracepoint *);
+void (*deprecated_trace_find_hook) (char *arg, int from_tty);
+void (*deprecated_trace_start_stop_hook) (int start, int from_tty);
struct tracepoint *get_tracepoint_by_number (char **, int, int);
int get_traceframe_number (void);
return retval;
}
-/* Prevent recursion of registers_changed_hook(). */
+/* Prevent recursion of deprecated_registers_changed_hook(). */
static int tui_refreshing_registers = 0;
static void
void
tui_install_hooks (void)
{
- target_wait_hook = tui_target_wait_hook;
- selected_frame_level_changed_hook = tui_selected_frame_level_changed_hook;
- print_frame_info_listing_hook = tui_print_frame_info_listing_hook;
+ 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;
- query_hook = tui_query_hook;
+ deprecated_query_hook = tui_query_hook;
/* Install the event hooks. */
tui_old_event_hooks = set_gdb_event_hooks (&tui_event_hooks);
- registers_changed_hook = tui_registers_changed_hook;
- register_changed_hook = tui_register_changed_hook;
- detach_hook = tui_detach_hook;
+ deprecated_registers_changed_hook = tui_registers_changed_hook;
+ deprecated_register_changed_hook = tui_register_changed_hook;
+ deprecated_detach_hook = tui_detach_hook;
}
/* Remove the TUI specific hooks. */
void
tui_remove_hooks (void)
{
- target_wait_hook = 0;
- selected_frame_level_changed_hook = 0;
- print_frame_info_listing_hook = 0;
- query_hook = 0;
- registers_changed_hook = 0;
- register_changed_hook = 0;
- detach_hook = 0;
+ deprecated_target_wait_hook = 0;
+ deprecated_selected_frame_level_changed_hook = 0;
+ deprecated_print_frame_info_listing_hook = 0;
+ deprecated_query_hook = 0;
+ deprecated_registers_changed_hook = 0;
+ deprecated_register_changed_hook = 0;
+ deprecated_detach_hook = 0;
/* Restore the previous event hooks. */
set_gdb_event_hooks (tui_old_event_hooks);
_initialize_tui_hooks (void)
{
/* Install the permanent hooks. */
- tui_target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = tui_new_objfile_hook;
+ tui_target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = tui_new_objfile_hook;
}
tui_stderr = tui_fileopen (stderr);
tui_out = tui_out_new (tui_stdout);
- /* Create the default UI. It is not created because we installed
- a init_ui_hook. */
+ /* Create the default UI. It is not created because we installed a
+ deprecated_init_ui_hook. */
tui_old_uiout = uiout = cli_out_new (gdb_stdout);
#ifdef TUI_USE_PIPE_FOR_READLINE
/* readline defines this. */
#undef savestring
-void (*error_begin_hook) (void);
+void (*deprecated_error_begin_hook) (void);
/* Holds the last error message issued by gdb */
void
vwarning (const char *string, va_list args)
{
- if (warning_hook)
- (*warning_hook) (string, args);
+ if (deprecated_warning_hook)
+ (*deprecated_warning_hook) (string, args);
else
{
target_terminal_ours ();
NORETURN void
error_stream (struct ui_file *stream)
{
- if (error_begin_hook)
- error_begin_hook ();
+ if (deprecated_error_begin_hook)
+ deprecated_error_begin_hook ();
/* Copy the stream into the GDB_LASTERR buffer. */
ui_file_rewind (gdb_lasterr);
int ans2;
int retval;
- if (query_hook)
+ if (deprecated_query_hook)
{
va_start (args, ctlstr);
- return query_hook (ctlstr, args);
+ return deprecated_query_hook (ctlstr, args);
}
/* Automatically answer "yes" if input is not from a terminal. */
n_string = "[n]";
}
- if (query_hook)
+ if (deprecated_query_hook)
{
- return query_hook (ctlstr, args);
+ return deprecated_query_hook (ctlstr, args);
}
/* Automatically answer default value if input is not from a terminal. */
they lack current_target's default callbacks. */
static struct target_ops base_ops;
-/* Saved pointer to previous owner of target_new_objfile_hook. */
+/* Saved pointer to previous owner of
+ deprecated_target_new_objfile_hook. */
static void (*target_new_objfile_chain)(struct objfile *);
/* Whether we are debugging a user-space thread program. This isn't
deactivate_uw_thread ();
}
-/* target_new_objfile_hook callback.
+/* deprecated_target_new_objfile_hook callback.
If OBJFILE is non-null, check whether libthread.so was just loaded,
and if so, prepare for user-mode thread debugging.
procfs_suppress_run = 1;
/* Notice when libthread.so gets loaded. */
- target_new_objfile_chain = target_new_objfile_hook;
- target_new_objfile_hook = uw_thread_new_objfile;
+ target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = uw_thread_new_objfile;
}
}
write_memory (changed_addr, dest_buffer, changed_len);
- if (memory_changed_hook)
- memory_changed_hook (changed_addr, changed_len);
+ if (deprecated_memory_changed_hook)
+ deprecated_memory_changed_hook (changed_addr, changed_len);
target_changed_event ();
}
break;
put_frame_register (frame, regno, buffer + amount_copied);
}
- if (register_changed_hook)
- register_changed_hook (-1);
+ if (deprecated_register_changed_hook)
+ deprecated_register_changed_hook (-1);
target_changed_event ();
break;
}