@c This file is part of the GDB manual.
@c
-@c Copyright (C) 2003, 2004, 2005, 2006
-@c Free Software Foundation, Inc.
+@c Copyright (C) 2003-2013 Free Software Foundation, Inc.
@c
@c See the file gdbint.texinfo for copying conditions.
@c
@c header file during the GDB build process. Permission is granted
@c to redistribute and/or modify those lines under the terms of the
@c GNU General Public License as published by the Free Software
-@c Foundation; either version 2 of the License, or (at your option)
+@c Foundation; either version 3 of the License, or (at your option)
@c any later version.
@node GDB Observers
The following observable events are defined:
-@c note: all events must take at least one parameter.
-
-@deftypefun void normal_stop (struct bpstats *@var{bs})
-The inferior has stopped for real.
+@deftypefun void normal_stop (struct bpstats *@var{bs}, int @var{print_frame})
+The inferior has stopped for real. The @var{bs} argument describes
+the breakpoints were are stopped at, if any. Second argument
+@var{print_frame} non-zero means display the location where the
+inferior has stopped.
@end deftypefun
@deftypefun void target_changed (struct target_ops *@var{target})
The target's register contents have changed.
@end deftypefun
-@deftypefun void executable_changed (void *@var{unused_args})
+@deftypefun void executable_changed (void)
The executable being debugged by GDB has changed: The user decided
to debug a different program, or the program he was debugging has
been modified since being loaded by the debugger (by being recompiled,
inferior, and before any information on the inferior has been printed.
@end deftypefun
+@deftypefun void record_changed (struct inferior *@var{inferior}, int @var{started})
+The status of process record for inferior @var{inferior} in
+@value{GDBN} has changed. The process record is started if
+@var{started} is true, and the process record is stopped if
+@var{started} is false.
+@end deftypefun
+
@deftypefun void solib_loaded (struct so_list *@var{solib})
The shared library specified by @var{solib} has been loaded. Note that
when @value{GDBN} calls this observer, the library's symbols probably
@deftypefun void solib_unloaded (struct so_list *@var{solib})
The shared library specified by @var{solib} has been unloaded.
+Note that when @value{GDBN} calls this observer, the library's
+symbols have not been unloaded yet, and thus are still available.
@end deftypefun
@deftypefun void new_objfile (struct objfile *@var{objfile})
previously loaded symbol table data has now been invalidated.
@end deftypefun
+@deftypefun void free_objfile (struct objfile *@var{objfile})
+The object file specified by @var{objfile} is about to be freed.
+@end deftypefun
+
@deftypefun void new_thread (struct thread_info *@var{t})
The thread specified by @var{t} has been created.
@end deftypefun
-@deftypefun void thread_exit (struct thread_info *@var{t})
-The thread specified by @var{t} has exited.
+@deftypefun void thread_exit (struct thread_info *@var{t}, int @var{silent})
+The thread specified by @var{t} has exited. The @var{silent} argument
+indicates that @value{GDBN} is removing the thread from its tables
+without wanting to notify the user about it.
+@end deftypefun
+
+@deftypefun void thread_stop_requested (ptid_t @var{ptid})
+An explicit stop request was issued to @var{ptid}. If @var{ptid}
+equals @var{minus_one_ptid}, the request applied to all threads. If
+@code{ptid_is_pid(ptid)} returns true, the request applied to all
+threads of the process pointed at by @var{ptid}. Otherwise, the
+request applied to the single thread pointed at by @var{ptid}.
@end deftypefun
@deftypefun void target_resumed (ptid_t @var{ptid})
thread was resume, and may be RESUME_ALL if all threads are resumed.
@end deftypefun
+@deftypefun void about_to_proceed (void)
+The target is about to be proceeded.
+@end deftypefun
+
+@deftypefun void breakpoint_created (struct breakpoint *@var{b})
+A new breakpoint @var{b} has been created.
+@end deftypefun
+
+@deftypefun void breakpoint_deleted (struct breakpoint *@var{b})
+A breakpoint has been destroyed. The argument @var{b} is the
+pointer to the destroyed breakpoint.
+@end deftypefun
+
+@deftypefun void breakpoint_modified (struct breakpoint *@var{b})
+A breakpoint has been modified in some way. The argument @var{b}
+is the modified breakpoint.
+@end deftypefun
+
+@deftypefun void traceframe_changed (int @var{tfnum}, int @var{tpnum})
+The trace frame is changed to @var{tfnum} (e.g., by using the
+@code{tfind} command). If @var{tfnum} is negative, it means
+@value{GDBN} resumes live debugging. The number of the tracepoint
+associated with this traceframe is @var{tpnum}.
+@end deftypefun
+
+@deftypefun void architecture_changed (struct gdbarch *@var{newarch})
+The current architecture has changed. The argument @var{newarch} is
+a pointer to the new architecture.
+@end deftypefun
+
+@deftypefun void thread_ptid_changed (ptid_t @var{old_ptid}, ptid_t @var{new_ptid})
+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_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_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 (struct inferior *@var{inferior}, CORE_ADDR @var{addr}, ssize_t @var{len}, const bfd_byte *@var{data})
+Bytes from @var{data} to @var{data} + @var{len} have been written
+to the @var{inferior} at @var{addr}.
+@end deftypefun
+
+@deftypefun void before_prompt (const char *@var{current_prompt})
+Called before a top-level prompt is displayed. @var{current_prompt} is
+the current top-level prompt.
+@end deftypefun
+
+@deftypefun void gdb_datadir_changed (void)
+Variable gdb_datadir has been set. The value may not necessarily change.
+@end deftypefun
+
+@deftypefun void command_param_changed (const char *@var{param}, const char *@var{value})
+The parameter of some @code{set} commands in console are changed. This
+method is called after a command @code{set @var{param} @var{value}}.
+@var{param} is the parameter of @code{set} command, and @var{value}
+is the value of changed parameter.
+@end deftypefun
+
+@deftypefun void tsv_created (const struct trace_state_variable *@var{tsv})
+The new trace state variable @var{tsv} is created.
+@end deftypefun
+
+@deftypefun void tsv_deleted (const struct trace_state_variable *@var{tsv})
+The trace state variable @var{tsv} is deleted. If @var{tsv} is
+@code{NULL}, all trace state variables are deleted.
+@end deftypefun
+
+@deftypefun void tsv_modified (const struct trace_state_variable *@var{tsv})
+The trace state value @var{tsv} is modified.
+@end deftypefun
+
+@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
+