diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-03-14 17:21:08 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-03-14 17:21:08 +0000 |
commit | 683f2885af8be6282b3a89b77b0bf06a616c0040 (patch) | |
tree | 5509137dc1e48acb3860e6381fff5d420a322249 /gdb/interps.h | |
parent | 0f2830ff5e67bb402e811cfb857c4f22bd7df455 (diff) | |
download | gdb-683f2885af8be6282b3a89b77b0bf06a616c0040.zip gdb-683f2885af8be6282b3a89b77b0bf06a616c0040.tar.gz gdb-683f2885af8be6282b3a89b77b0bf06a616c0040.tar.bz2 |
Implement MI notification for new threads.
* doc/observer.texi (new_thread): Document.
* observer.sh: Forward declare struct thread_info.
* thread.c (add_thread): Notify observer.
* interps.h (interp_init_ftype): New parameter
top_level.
(interp_set): Likewise.
(top_level_interpreter_data): Declare.
* interps.c (interp_set): New parameter top_level.
Pass it to interpreter's init function. Remember
top level interpreter.
(interpreter_exec_cmd): Adjust.
(top_level_interpreter_data): New.
* main.c (captured_main): Pass 1 for top_level
parameter of interp_set.
* cli/cli-interp.c (cli_interpreter_init): New
parameter top_level.
* tui/tui-interp.c (tui_init): New parameter top_level.
* mi/mi-interp.c (mi_new_thread): New.
(mi_interpreter_init): If top level, register
observer for new threads.
* Makefile.in (mi-interp.o, thread.o): Update dependencies.
Diffstat (limited to 'gdb/interps.h')
-rw-r--r-- | gdb/interps.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/interps.h b/gdb/interps.h index e1286be..e1030fa 100644 --- a/gdb/interps.h +++ b/gdb/interps.h @@ -35,7 +35,7 @@ extern struct gdb_exception interp_exec (struct interp *interp, const char *command); extern int interp_quiet_p (struct interp *interp); -typedef void *(interp_init_ftype) (void); +typedef void *(interp_init_ftype) (int top_level); typedef int (interp_resume_ftype) (void *data); typedef int (interp_suspend_ftype) (void *data); typedef int (interp_prompt_p_ftype) (void *data); @@ -57,13 +57,15 @@ extern struct interp *interp_new (const char *name, void *data, struct ui_out *uiout, const struct interp_procs *procs); extern void interp_add (struct interp *interp); -extern int interp_set (struct interp *interp); +extern int interp_set (struct interp *interp, int top_level); extern struct interp *interp_lookup (const char *name); extern struct ui_out *interp_ui_out (struct interp *interp); extern int current_interp_named_p (const char *name); extern int current_interp_display_prompt_p (void); extern void current_interp_command_loop (void); +/* Returns opaque data associated with the top-level interpreter. */ +extern void *top_level_interpreter_data (void); extern void clear_interpreter_hooks (void); |