handler.
(mi_command_loop): Remove big block of code repeated in
mi_interpreter_resume. I don't think this is needed.
(mi_insert_notify_hooks): Remove context_hook.
(mi_remove_notify_hooks): Likewise.
* mi-events.c (mi_context_changed): New function.
* mi.h (mi_context_changed): Add declaration.
+2002-08-09 Keith Seitz <keiths@redhat.com>
+
+ * mi-interp.c (mi_event_handlers): Add context_changed event
+ handler.
+ (mi_command_loop): Remove big block of code repeated in
+ mi_interpreter_resume. I don't think this is needed.
+ (mi_insert_notify_hooks): Remove context_hook.
+ (mi_remove_notify_hooks): Likewise.
+ * mi-events.c (mi_context_changed): New function.
+ * mi.h (mi_context_changed): Add declaration.
+
2002-07-25 Keith Seitz <keiths@redhat.com>
* mi-interp.c (mi_event_handlers): Add selected_frame_level_changed
remove redundant breakpoint info on "-break-insert" and "-break-watch".
The event now supplies everything that is needed.
+2002-05-28 Keith Seitz <keiths@redhat.com>
+
+ * mi-interp.c: New file. Almost entirely from Apple's
+ sources. Collected and moved here.
+ * mi-events.c: Ditto.
+ * mi.h: New file.
+ * mi-main.c (captured_execute_command): Use catch_exception
+ instead of catch_errors.
+ (mi_execute_command_wrapper): Remove. Using catch_errors now.
+ (mi_input): Make global.
+ (mi_load_progress): Ditto.
+ Use interpreter functions instead of interpreter_p.
+ (mi_command_loop): Moved to mi-interp.c
+ (mi0_command_loop): Ditto.
+ (mi1_command_loop): Ditto.
+ (mi_init_ui): Remove.
+ (_initialize_mi_main): Remove. No longer needed.
+
2002-07-29 Andrew Cagney <ac131313@redhat.com>
* mi-cmd-var.c: Include "gdb_string.h".
uiout = saved_ui_out;
}
-void
-mi_interp_context_hook (int thread_id)
-{
- struct ui_out *saved_ui_out = uiout;
- struct mi_out *tmp_mi_out;
-
- if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI0))
- uiout = gdb_interpreter_ui_out (mi0_interp);
- else
- uiout = gdb_interpreter_ui_out (mi_interp);
-
- ui_out_list_begin (uiout, "MI_HOOK_RESULT");
- ui_out_field_string (uiout, "HOOK_TYPE", "thread_changed");
- ui_out_field_int (uiout, "thread", thread_id);
- ui_out_list_end (uiout);
- uiout = saved_ui_out;
-}
-
static void
event_notify (const char *string, ...)
{
{
event_notify ("selected-frame-level-changed,level=\"%d\"", level);
}
+
+void
+mi_context_changed (int thread_id)
+{
+ event_notify ("context-changed,thread=\"%d\"", thread_id);
+}
mi_modify_tracepoint,
mi_architecture_changed,
mi_register_update,
- mi_selected_frame_level_changed
+ mi_selected_frame_level_changed,
+ mi_context_changed
};
static int
static void
mi_insert_notify_hooks (void)
{
- context_hook = mi_interp_context_hook;
query_hook = mi_interp_query_hook;
}
static void
mi_remove_notify_hooks ()
{
- context_hook = NULL;
query_hook = NULL;
}
static void
mi_command_loop (int mi_version)
{
+#if 0
/* HACK: Force stdout/stderr to point at the console. This avoids
any potential side effects caused by legacy code that is still
using the TUI / fputs_unfiltered_hook */
error_hook = 0;
error_begin_hook = 0;
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. */
sevenbit_strings = 1;
extern void mi_architecture_changed (void);
extern void mi_register_update(int regno);
extern void mi_selected_frame_level_changed (int level);
+extern void mi_context_changed (int thread_id);
#endif /* MI_H */