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
78
79} /* namespace observers */
80} /* namespace gdb */
81
82static void
83show_observer_debug (struct ui_file *file, int from_tty,
84 struct cmd_list_element *c, const char *value)
85{
86 gdb_printf (file, _("Observer debugging is %s.\n"), value);
87}
88
90void
92{
95Set observer debugging."), _("\
96Show observer debugging."), _("\
97When non-zero, observer debugging is enabled."),
98 NULL,
101}
struct cmd_list_element * showdebuglist
Definition cli-cmds.c:167
struct cmd_list_element * setdebuglist
Definition cli-cmds.c:165
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:809
@ 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
bool observer_debug
Definition observable.c:31
observable< struct inferior * > inferior_added
observable< struct inferior * > inferior_exit
observable< struct breakpoint * > breakpoint_created
observable< struct objfile * > free_objfile
observable< struct breakpoint * > breakpoint_modified
observable< struct breakpoint * > breakpoint_deleted
observable< ptid_t > target_post_wait
observable< struct objfile * > new_objfile
observable< inferior *, inferior * > inferior_execd
observable< struct thread_info * > new_thread
observable< struct inferior * > inferior_removed
observable< ptid_t, CORE_ADDR > inferior_call_post
observable< inferior *, inferior *, target_waitkind > inferior_forked
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< process_stratum_target *, ptid_t, ptid_t > thread_ptid_changed
observable< ptid_t > target_pre_wait
observable< program_space * > new_program_space
observable< ptid_t > target_resumed
observable< struct program_space *, bool > executable_changed
observable< struct gdbarch * > architecture_changed
observable about_to_proceed
observable< program_space * > all_objfiles_removed
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< struct inferior * > inferior_pre_detach
observable< thread_info *, gdb::optional< ULONGEST >, bool > thread_exit
observable< struct program_space *, struct so_list * > solib_unloaded
observable< enum gdb_signal > signal_received
observable< program_space * > free_program_space
observable styling_changed
observable< struct inferior *, struct inferior * > inferior_cloned
void _initialize_observer()
Definition observable.c:91
static void show_observer_debug(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
Definition observable.c:83
#define DEFINE_OBSERVABLE(name)
Definition observable.c:33
Definition value.h:130
void gdb_printf(struct ui_file *stream, const char *format,...)
Definition utils.c:1886