gdb: use two displaced step buffers on amd64-linux
[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);
c0fdb45e 66DEFINE_OBSERVABLE (inferior_execd);
76727919
TT
67DEFINE_OBSERVABLE (memory_changed);
68DEFINE_OBSERVABLE (before_prompt);
69DEFINE_OBSERVABLE (gdb_datadir_changed);
70DEFINE_OBSERVABLE (command_param_changed);
71DEFINE_OBSERVABLE (tsv_created);
72DEFINE_OBSERVABLE (tsv_deleted);
73DEFINE_OBSERVABLE (tsv_modified);
74DEFINE_OBSERVABLE (inferior_call_pre);
75DEFINE_OBSERVABLE (inferior_call_post);
76DEFINE_OBSERVABLE (register_changed);
77DEFINE_OBSERVABLE (user_selected_context_changed);
6f11e682 78DEFINE_OBSERVABLE (source_styling_changed);
a75cd9a2 79DEFINE_OBSERVABLE (current_source_symtab_and_line_changed);
76727919
TT
80
81} /* namespace observers */
82} /* namespace gdb */
83
84static void
85show_observer_debug (struct ui_file *file, int from_tty,
86 struct cmd_list_element *c, const char *value)
87{
88 fprintf_filtered (file, _("Observer debugging is %s.\n"), value);
89}
90
6c265988 91void _initialize_observer ();
76727919 92void
6c265988 93_initialize_observer ()
76727919
TT
94{
95 add_setshow_zuinteger_cmd ("observer", class_maintenance,
96 &gdb::observers::observer_debug, _("\
97Set observer debugging."), _("\
98Show observer debugging."), _("\
99When non-zero, observer debugging is enabled."),
100 NULL,
101 show_observer_debug,
102 &setdebuglist, &showdebuglist);
103}
This page took 0.282516 seconds and 4 git commands to generate.