gdb: Remove an update of current_source_line and current_source_symtab
[external/binutils.git] / gdb / annotate.h
1 /* Annotation routines for GDB.
2    Copyright (C) 1986-2019 Free Software Foundation, Inc.
3
4    This file is part of GDB.
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
18
19 #ifndef ANNOTATE_H
20 #define ANNOTATE_H
21
22 #include "symtab.h"
23 #include "gdbtypes.h"
24
25 extern void annotate_breakpoint (int);
26 extern void annotate_catchpoint (int);
27 extern void annotate_watchpoint (int);
28 extern void annotate_starting (void);
29 extern void annotate_stopped (void);
30 extern void annotate_exited (int);
31 extern void annotate_signalled (void);
32 extern void annotate_signal_name (void);
33 extern void annotate_signal_name_end (void);
34 extern void annotate_signal_string (void);
35 extern void annotate_signal_string_end (void);
36 extern void annotate_signal (void);
37
38 extern void annotate_breakpoints_headers (void);
39 extern void annotate_field (int);
40 extern void annotate_breakpoints_table (void);
41 extern void annotate_record (void);
42 extern void annotate_breakpoints_table_end (void);
43
44 extern void annotate_frames_invalid (void);
45 extern void annotate_new_thread (void);
46 extern void annotate_thread_changed (void);
47
48 extern void annotate_display_prompt (void);
49
50 struct type;
51
52 extern void annotate_field_begin (struct type *);
53 extern void annotate_field_name_end (void);
54 extern void annotate_field_value (void);
55 extern void annotate_field_end (void);
56
57 extern void annotate_quit (void);
58 extern void annotate_error (void);
59 extern void annotate_error_begin (void);
60
61 extern void annotate_value_history_begin (int, struct type *);
62 extern void annotate_value_begin (struct type *);
63 extern void annotate_value_history_value (void);
64 extern void annotate_value_history_end (void);
65 extern void annotate_value_end (void);
66
67 extern void annotate_display_begin (void);
68 extern void annotate_display_number_end (void);
69 extern void annotate_display_format (void);
70 extern void annotate_display_expression (void);
71 extern void annotate_display_expression_end (void);
72 extern void annotate_display_value (void);
73 extern void annotate_display_end (void);
74
75 extern void annotate_arg_begin (void);
76 extern void annotate_arg_name_end (void);
77 extern void annotate_arg_value (struct type *);
78 extern void annotate_arg_end (void);
79
80 /* Wrap calls to annotate_arg_begin and annotate_arg_end in an RAII
81    class. */
82 struct annotate_arg_emitter
83 {
84   annotate_arg_emitter () { annotate_arg_begin (); }
85   ~annotate_arg_emitter () { annotate_arg_end (); }
86
87   DISABLE_COPY_AND_ASSIGN (annotate_arg_emitter);
88 };
89
90 /* If annotations are turned on then print annotation describing the full
91    name of the source file S and the line number LINE and its corresponding
92    character position.
93
94    MID_STATEMENT is nonzero if the PC is not at the beginning of that
95    line.
96
97    Return true if successful, false if the file could not be found or
98    annotations are turned off.  */
99 extern bool annotate_source_line (struct symtab *s, int line,
100                                   int mid_statement, CORE_ADDR pc);
101
102 extern void annotate_frame_begin (int, struct gdbarch *, CORE_ADDR);
103 extern void annotate_function_call (void);
104 extern void annotate_signal_handler_caller (void);
105 extern void annotate_frame_address (void);
106 extern void annotate_frame_address_end (void);
107 extern void annotate_frame_function_name (void);
108 extern void annotate_frame_args (void);
109 extern void annotate_frame_source_begin (void);
110 extern void annotate_frame_source_file (void);
111 extern void annotate_frame_source_file_end (void);
112 extern void annotate_frame_source_line (void);
113 extern void annotate_frame_source_end (void);
114 extern void annotate_frame_where (void);
115 extern void annotate_frame_end (void);
116
117 extern void annotate_array_section_begin (int, struct type *);
118 extern void annotate_elt_rep (unsigned int);
119 extern void annotate_elt_rep_end (void);
120 extern void annotate_elt (void);
121 extern void annotate_array_section_end (void);
122
123 extern void (*deprecated_annotate_signalled_hook) (void);
124 extern void (*deprecated_annotate_signal_hook) (void);
125
126 #endif /* ANNOTATE_H */