GDB (xrefs)
Loading...
Searching...
No Matches
observable.c
Go to the documentation of this file.
1/* GDB Notifications to Observers.
2
3 Copyright (C) 2003-2023 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20#include "defs.h"
21#include "observable.h"
22#include "command.h"
23#include "gdbcmd.h"
24
25namespace gdb
26{
27
28namespace observers
29{
30
31bool observer_debug = false;
32
33#define DEFINE_OBSERVABLE(name) decltype (name) name (# name)
34
84
85} /* namespace observers */
86} /* namespace gdb */
87
88static void
89show_observer_debug (struct ui_file *file, int from_tty,
90 struct cmd_list_element *c, const char *value)
91{
92 gdb_printf (file, _("Observer debugging is %s.\n"), value);
93}
94
96void
98{
101Set observer debugging."), _("\
102Show observer debugging."), _("\
103When non-zero, observer debugging is enabled."),
104 NULL,
107}
struct cmd_list_element * showdebuglist
Definition cli-cmds.c:165
struct cmd_list_element * setdebuglist
Definition cli-cmds.c:163
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
Definition cli-decode.c:739
@ class_maintenance
Definition command.h:65
observable< ptid_t, CORE_ADDR > inferior_call_pre
observable< struct inferior *, CORE_ADDR, ssize_t, const bfd_byte * > memory_changed
observable< struct so_list * > solib_loaded
observable current_source_symtab_and_line_changed
observable< ptid_t > thread_stop_requested
observable< struct so_list * > solib_unloaded
observable< const char *, const char * > command_param_changed
bool observer_debug
Definition observable.c:31
observable< struct inferior * > inferior_added
observable< struct inferior * > inferior_exit
observable< struct inferior * > inferior_execd
observable sync_execution_done
observable< const struct trace_state_variable * > tsv_created
observable< struct breakpoint * > breakpoint_created
observable< struct objfile * > free_objfile
observable< struct breakpoint * > breakpoint_modified
observable< const struct trace_state_variable * > tsv_modified
observable< struct breakpoint * > breakpoint_deleted
observable< ptid_t > target_post_wait
observable no_history
observable< int > exited
observable executable_changed
observable< const struct trace_state_variable * > tsv_deleted
observable< struct objfile * > new_objfile
observable< struct thread_info * > new_thread
observable< struct inferior * > inferior_removed
observable< struct thread_info *, int > thread_exit
observable< ptid_t, CORE_ADDR > inferior_call_post
observable end_stepping_range
observable command_error
observable gdb_datadir_changed
observable< const char * > before_prompt
observable< inferior * > inferior_created
observable< struct target_ops * > target_changed
observable< int > gdb_exiting
observable< user_selected_what > user_selected_context_changed
observable< enum gdb_signal > signal_exited
observable< process_stratum_target *, ptid_t, ptid_t > thread_ptid_changed
observable< ptid_t > target_pre_wait
observable< ptid_t > target_resumed
observable< struct gdbarch * > architecture_changed
observable about_to_proceed
observable< struct inferior * > inferior_appeared
observable< struct bpstat *, int > normal_stop
observable< frame_info_ptr, int > register_changed
observable< process_stratum_target * > connection_removed
observable< enum gdb_signal > signal_received
observable< int, int > traceframe_changed
observable styling_changed
observable< struct inferior *, int, const char *, const char * > record_changed
void _initialize_observer()
Definition observable.c:97
static void show_observer_debug(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
Definition observable.c:89
#define DEFINE_OBSERVABLE(name)
Definition observable.c:33
Definition value.c:181
void gdb_printf(struct ui_file *stream, const char *format,...)
Definition utils.c:1865