summaryrefslogtreecommitdiff
path: root/gdb/doc/observer.texi
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2010-02-24 07:51:44 +0000
committerVladimir Prus <vladimir@codesourcery.com>2010-02-24 07:51:44 +0000
commitac58779be4c37e91a3698ec45c761d96e36b0074 (patch)
treee634ad13defabc35a1886e9c9b3b46e09bcd4fba /gdb/doc/observer.texi
parentc343803c424bdf125a07ad296ad54fa3dc78bf6b (diff)
downloadgdb-ac58779be4c37e91a3698ec45c761d96e36b0074.tar.gz
Multiexec MI
* breakpoint.c (clear_syscall_counts): Take struct inferior*. * inferior.c (add_inferior_silent): Notify inferior_added observer. (delete_inferior_1): Notify inferior_removed observer. (exit_inferior_1): Pass inferior, not pid, to observer. (inferior_appeared): Likewise. (add_inferior_with_spaces): New. (add_inferior_command): Use the above. * inferior.h (delete_inferior_1, add_inferior_with_spaces): Declare. * inflow.c (inflow_inferior_exit): Likewise. * jit.c (jit_inferior_exit_hook): Likewise. * mi/mi-cmds.c (mi_cmds): Register add-inferior and remove-inferior. * mi/mi-cmds.h (mi_cmd_add_inferior, mi_cmd_remove_inferior): New. * mi/mi-interp.c (mi_inferior_added, mi_inferior_removed): New. (report_initial_inferior): New. (mi_inferior_removed): Register the above. Make sure inferior_added observer is called on the first inferior. (mi_new_thread, mi_thread_exit): Thread group is now identified by inferior number, not pid. (mi_solib_loaded, mi_solib_unloaded): Report which inferiors are affected. * mi/mi-main.c (current_context): New. (proceed_thread_callback): Use typed closure. Proceed everything if pid is 0. Most implementation split into (proceed_thread): ... this. (run_one_inferior): New. (mi_cmd_exec_continue, mi_cmd_exec_interrupt, mi_cmd_exec_run): Adjust for multiexec behaviour. (mi_cmd_add_inferior, mi_cmd_remove_inferior): New. (mi_cmd_execute): Handle the 'thread-group' option here. Do some extra checks. * mi-parse.c (mi_parse): Handle the --all and --thread-group options. * mi-parse.h (struct mi_parse): New fields all and thread_group.
Diffstat (limited to 'gdb/doc/observer.texi')
-rw-r--r--gdb/doc/observer.texi24
1 files changed, 17 insertions, 7 deletions
diff --git a/gdb/doc/observer.texi b/gdb/doc/observer.texi
index db3d1141e86..e19b8ed2a9d 100644
--- a/gdb/doc/observer.texi
+++ b/gdb/doc/observer.texi
@@ -199,13 +199,23 @@ The thread's ptid has changed. The @var{old_ptid} parameter specifies
the old value, and @var{new_ptid} specifies the new value.
@end deftypefun
-@deftypefun void inferior_appeared (int @var{pid})
-@value{GDBN} has attached to a new inferior identified by @var{pid}.
+@deftypefun void inferior_added (struct inferior *@var{inf})
+The inferior @var{inf} has been added to the list of inferiors. At
+this point, it might not be associated with any process.
@end deftypefun
-@deftypefun void inferior_exit (int @var{pid})
-Either @value{GDBN} detached from the inferior, or the inferior
-exited. The argument @var{pid} identifies the inferior.
+@deftypefun void inferior_appeared (struct inferior *@var{inf})
+The inferior identified by @var{inf} has been attached to a process.
+@end deftypefun
+
+@deftypefun void inferior_exit (struct inferior *@var{inf})
+Either the inferior associated with @var{inf} has been detached from the
+process, or the process has exited.
+@end deftypefun
+
+@deftypefun void inferior_removed (struct inferior *@var{inf})
+The inferior @var{inf} has been removed from the list of inferiors.
+This method is called immediately before freeing @var{inf}.
@end deftypefun
@deftypefun void memory_changed (CORE_ADDR @var{addr}, int @var{len}, const bfd_byte *@var{data})
@@ -213,8 +223,8 @@ Bytes from @var{data} to @var{data} + @var{len} have been written
to the current inferior at @var{addr}.
@end deftypefun
- @deftypefun void test_notification (int @var{somearg})
+@deftypefun void test_notification (int @var{somearg})
This observer is used for internal testing. Do not use.
See testsuite/gdb.gdb/observer.exp.
- @end deftypefun
+@end deftypefun