Use std::string in dwarf2read.c
[deliverable/binutils-gdb.git] / gdb / observable.c
CommitLineData
76727919
TT
1/* GDB Notifications to Observers.
2
b811d2c2 3 Copyright (C) 2003-2020 Free Software Foundation, Inc.
76727919
TT
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
31unsigned int observer_debug;
32
33#define DEFINE_OBSERVABLE(name) decltype (name) name (# name)
34
35DEFINE_OBSERVABLE (normal_stop);
36DEFINE_OBSERVABLE (signal_received);
37DEFINE_OBSERVABLE (end_stepping_range);
38DEFINE_OBSERVABLE (signal_exited);
39DEFINE_OBSERVABLE (exited);
40DEFINE_OBSERVABLE (no_history);
41DEFINE_OBSERVABLE (sync_execution_done);
42DEFINE_OBSERVABLE (command_error);
43DEFINE_OBSERVABLE (target_changed);
44DEFINE_OBSERVABLE (executable_changed);
45DEFINE_OBSERVABLE (inferior_created);
46DEFINE_OBSERVABLE (record_changed);
47DEFINE_OBSERVABLE (solib_loaded);
48DEFINE_OBSERVABLE (solib_unloaded);
49DEFINE_OBSERVABLE (new_objfile);
50DEFINE_OBSERVABLE (free_objfile);
51DEFINE_OBSERVABLE (new_thread);
52DEFINE_OBSERVABLE (thread_exit);
53DEFINE_OBSERVABLE (thread_stop_requested);
54DEFINE_OBSERVABLE (target_resumed);
55DEFINE_OBSERVABLE (about_to_proceed);
56DEFINE_OBSERVABLE (breakpoint_created);
57DEFINE_OBSERVABLE (breakpoint_deleted);
58DEFINE_OBSERVABLE (breakpoint_modified);
59DEFINE_OBSERVABLE (traceframe_changed);
60DEFINE_OBSERVABLE (architecture_changed);
61DEFINE_OBSERVABLE (thread_ptid_changed);
62DEFINE_OBSERVABLE (inferior_added);
63DEFINE_OBSERVABLE (inferior_appeared);
64DEFINE_OBSERVABLE (inferior_exit);
65DEFINE_OBSERVABLE (inferior_removed);
66DEFINE_OBSERVABLE (memory_changed);
67DEFINE_OBSERVABLE (before_prompt);
68DEFINE_OBSERVABLE (gdb_datadir_changed);
69DEFINE_OBSERVABLE (command_param_changed);
70DEFINE_OBSERVABLE (tsv_created);
71DEFINE_OBSERVABLE (tsv_deleted);
72DEFINE_OBSERVABLE (tsv_modified);
73DEFINE_OBSERVABLE (inferior_call_pre);
74DEFINE_OBSERVABLE (inferior_call_post);
75DEFINE_OBSERVABLE (register_changed);
76DEFINE_OBSERVABLE (user_selected_context_changed);
6f11e682 77DEFINE_OBSERVABLE (source_styling_changed);
a75cd9a2 78DEFINE_OBSERVABLE (current_source_symtab_and_line_changed);
76727919
TT
79
80} /* namespace observers */
81} /* namespace gdb */
82
83static void
84show_observer_debug (struct ui_file *file, int from_tty,
85 struct cmd_list_element *c, const char *value)
86{
87 fprintf_filtered (file, _("Observer debugging is %s.\n"), value);
88}
89
90void
91_initialize_observer (void)
92{
93 add_setshow_zuinteger_cmd ("observer", class_maintenance,
94 &gdb::observers::observer_debug, _("\
95Set observer debugging."), _("\
96Show observer debugging."), _("\
97When non-zero, observer debugging is enabled."),
98 NULL,
99 show_observer_debug,
100 &setdebuglist, &showdebuglist);
101}
This page took 0.23268 seconds and 4 git commands to generate.