]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/annotate.c
* breakpoint.c (breakpoint_1): Fix typo.
[thirdparty/binutils-gdb.git] / gdb / annotate.c
CommitLineData
1c95d7ab
JK
1/* Annotation routines for GDB.
2 Copyright 1986, 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
3
4This file is part of GDB.
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20#include "defs.h"
21#include "annotate.h"
22#include "value.h"
23#include "target.h"
9c036bd8
JK
24#include "gdbtypes.h"
25\f
26static void print_value_flags PARAMS ((struct type *));
1c95d7ab 27
9c036bd8
JK
28static void
29print_value_flags (t)
30 struct type *t;
31{
32 if (can_dereference (t))
33 printf_filtered ("*");
34 else
35 printf_filtered ("-");
36}
37\f
1c95d7ab
JK
38void
39breakpoints_changed ()
40{
41 if (annotation_level > 1)
42 {
43 target_terminal_ours ();
44 printf_unfiltered ("\n\032\032breakpoints-invalid\n");
45 }
46}
47
48void
49annotate_breakpoint (num)
50 int num;
51{
52 if (annotation_level > 1)
53 printf_filtered ("\n\032\032breakpoint %d\n", num);
54}
55
56void
57annotate_watchpoint (num)
58 int num;
59{
60 if (annotation_level > 1)
61 printf_filtered ("\n\032\032watchpoint %d\n", num);
62}
63
64void
65annotate_starting ()
66{
67 if (annotation_level > 1)
68 printf_filtered ("\n\032\032starting\n");
69}
70
71void
72annotate_stopped ()
73{
74 if (annotation_level > 1)
75 printf_filtered ("\n\032\032stopped\n");
76}
77
78void
79annotate_exited (exitstatus)
80 int exitstatus;
81{
82 if (annotation_level > 1)
83 printf_filtered ("\n\032\032exited %d\n", exitstatus);
84}
85
86void
87annotate_signalled ()
88{
89 if (annotation_level > 1)
90 printf_filtered ("\n\032\032signalled\n");
91}
92
93void
94annotate_signal_name ()
95{
96 if (annotation_level > 1)
97 printf_filtered ("\n\032\032signal-name\n");
98}
99
100void
101annotate_signal_name_end ()
102{
103 if (annotation_level > 1)
104 printf_filtered ("\n\032\032signal-name-end\n");
105}
106
107void
108annotate_signal_string ()
109{
110 if (annotation_level > 1)
111 printf_filtered ("\n\032\032signal-string\n");
112}
113
114void
115annotate_signal_string_end ()
116{
117 if (annotation_level > 1)
118 printf_filtered ("\n\032\032signal-string-end\n");
119}
120
121void
122annotate_signal ()
123{
124 if (annotation_level > 1)
125 printf_filtered ("\n\032\032signal\n");
126}
127\f
128void
129annotate_breakpoints_headers ()
130{
131 if (annotation_level > 1)
132 printf_filtered ("\n\032\032breakpoints-headers\n");
133}
134
135void
136annotate_field (num)
137 int num;
138{
139 if (annotation_level > 1)
140 printf_filtered ("\n\032\032field %d\n", num);
141}
142
143void
144annotate_breakpoints_table ()
145{
146 if (annotation_level > 1)
147 printf_filtered ("\n\032\032breakpoints-table\n");
148}
149
150void
151annotate_record ()
152{
153 if (annotation_level > 1)
154 printf_filtered ("\n\032\032record\n");
155}
156
157void
158annotate_breakpoints_table_end ()
159{
160 if (annotation_level > 1)
161 printf_filtered ("\n\032\032breakpoints-table-end\n");
162}
163
164void
165annotate_frames_invalid ()
166{
167 if (annotation_level > 1)
168 {
169 target_terminal_ours ();
170 printf_unfiltered ("\n\032\032frames-invalid\n");
171 }
172}
173
174void
175annotate_field_begin (type)
176 struct type *type;
177{
178 if (annotation_level > 1)
179 {
180 printf_filtered ("\n\032\032field-begin ");
181 print_value_flags (type);
182 printf_filtered ("\n");
183 }
184}
185
186void
187annotate_field_name_end ()
188{
189 if (annotation_level > 1)
190 printf_filtered ("\n\032\032field-name-end\n");
191}
192
193void
194annotate_field_value ()
195{
196 if (annotation_level > 1)
197 printf_filtered ("\n\032\032field-value\n");
198}
199
200void
201annotate_field_end ()
202{
203 if (annotation_level > 1)
20b3c1aa 204 printf_filtered ("\n\032\032field-end\n");
1c95d7ab
JK
205}
206\f
207void
208annotate_quit ()
209{
210 if (annotation_level > 1)
211 printf_filtered ("\n\032\032quit\n");
212}
213
214void
215annotate_error ()
216{
217 if (annotation_level > 1)
218 printf_filtered ("\n\032\032error\n");
219}
220
221void
222annotate_error_begin ()
223{
224 if (annotation_level > 1)
225 fprintf_filtered (gdb_stderr, "\n\032\032error-begin\n");
226}
227
228void
229annotate_value_history_begin (histindex, type)
230 int histindex;
231 struct type *type;
232{
233 if (annotation_level > 1)
234 {
235 printf_filtered ("\n\032\032value-history-begin %d ", histindex);
236 print_value_flags (type);
237 printf_filtered ("\n");
238 }
239}
240
241void
242annotate_value_begin (type)
243 struct type *type;
244{
245 if (annotation_level > 1)
246 {
247 printf_filtered ("\n\032\032value-begin ");
248 print_value_flags (type);
249 printf_filtered ("\n");
250 }
251}
252
253void
254annotate_value_history_value ()
255{
256 if (annotation_level > 1)
257 printf_filtered ("\n\032\032value-history-value\n");
258}
259
260void
261annotate_value_history_end ()
262{
263 if (annotation_level > 1)
264 printf_filtered ("\n\032\032value-history-end\n");
265}
266
267void
268annotate_value_end ()
269{
270 if (annotation_level > 1)
271 printf_filtered ("\n\032\032value-end\n");
272}
273
274void
275annotate_display_begin ()
276{
277 if (annotation_level > 1)
278 printf_filtered ("\n\032\032display-begin\n");
279}
280
281void
282annotate_display_number_end ()
283{
284 if (annotation_level > 1)
285 printf_filtered ("\n\032\032display-number-end\n");
286}
287
288void
289annotate_display_format ()
290{
291 if (annotation_level > 1)
292 printf_filtered ("\n\032\032display-format\n");
293}
294
295void
296annotate_display_expression ()
297{
298 if (annotation_level > 1)
299 printf_filtered ("\n\032\032display-expression\n");
300}
301
302void
303annotate_display_expression_end ()
304{
305 if (annotation_level > 1)
306 printf_filtered ("\n\032\032display-expression-end\n");
307}
308
309void
310annotate_display_value ()
311{
312 if (annotation_level > 1)
313 printf_filtered ("\n\032\032display-value\n");
314}
315
316void
317annotate_display_end ()
318{
319 if (annotation_level > 1)
320 printf_filtered ("\n\032\032display-end\n");
321}
322
323void
324annotate_arg_begin ()
325{
326 if (annotation_level > 1)
327 printf_filtered ("\n\032\032arg-begin\n");
328}
329
330void
331annotate_arg_name_end ()
332{
333 if (annotation_level > 1)
334 printf_filtered ("\n\032\032arg-name-end\n");
335}
336
337void
338annotate_arg_value (type)
339 struct type *type;
340{
341 if (annotation_level > 1)
342 {
343 printf_filtered ("\n\032\032arg-value ");
344 print_value_flags (type);
345 printf_filtered ("\n");
346 }
347}
348
349void
350annotate_arg_end ()
351{
352 if (annotation_level > 1)
353 printf_filtered ("\n\032\032arg-end\n");
354}
355
356void
357annotate_source (filename, line, character, mid, pc)
358 char *filename;
359 int line;
360 int character;
361 int mid;
362 CORE_ADDR pc;
363{
364 if (annotation_level > 1)
365 printf_filtered ("\n\032\032source ");
366 else
367 printf_filtered ("\032\032");
368
369 printf_filtered ("%s:%d:%d:%s:", filename,
370 line, character,
371 mid ? "middle" : "beg");
372 print_address_numeric (pc, 0, gdb_stdout);
373 printf_filtered ("\n");
374}
375
376void
377annotate_frame_begin (level, pc)
378 int level;
379 CORE_ADDR pc;
380{
381 if (annotation_level > 1)
382 {
383 printf_filtered ("\n\032\032frame-begin %d ", level);
384 print_address_numeric (pc, 0, gdb_stdout);
385 printf_filtered ("\n");
386 }
387}
388
389void
390annotate_function_call ()
391{
392 if (annotation_level > 1)
393 printf_filtered ("\n\032\032function-call\n");
394}
395
396void
397annotate_signal_handler_caller ()
398{
399 if (annotation_level > 1)
400 printf_filtered ("\n\032\032signal-handler-caller\n");
401}
402
403void
404annotate_frame_address ()
405{
406 if (annotation_level > 1)
407 printf_filtered ("\n\032\032frame-address\n");
408}
409
410void
411annotate_frame_address_end ()
412{
413 if (annotation_level > 1)
414 printf_filtered ("\n\032\032frame-address-end\n");
415}
416
417void
418annotate_frame_function_name ()
419{
420 if (annotation_level > 1)
421 printf_filtered ("\n\032\032frame-function-name\n");
422}
423
424void
425annotate_frame_args ()
426{
427 if (annotation_level > 1)
428 printf_filtered ("\n\032\032frame-args\n");
429}
430
431void
432annotate_frame_source_begin ()
433{
434 if (annotation_level > 1)
435 printf_filtered ("\n\032\032frame-source-begin\n");
436}
437
438void
439annotate_frame_source_file ()
440{
441 if (annotation_level > 1)
442 printf_filtered ("\n\032\032frame-source-file\n");
443}
444
445void
446annotate_frame_source_file_end ()
447{
448 if (annotation_level > 1)
449 printf_filtered ("\n\032\032frame-source-file-end\n");
450}
451
452void
453annotate_frame_source_line ()
454{
455 if (annotation_level > 1)
456 printf_filtered ("\n\032\032frame-source-line\n");
457}
458
459void
460annotate_frame_source_end ()
461{
462 if (annotation_level > 1)
463 printf_filtered ("\n\032\032frame-source-end\n");
464}
465
466void
467annotate_frame_where ()
468{
469 if (annotation_level > 1)
470 printf_filtered ("\n\032\032frame-where\n");
471}
472
473void
474annotate_frame_end ()
475{
476 if (annotation_level > 1)
477 printf_filtered ("\n\032\032frame-end\n");
478}
479\f
480void
481annotate_array_section_begin (index, elttype)
482 int index;
483 struct type *elttype;
484{
485 if (annotation_level > 1)
486 {
487 printf_filtered ("\n\032\032array-section-begin %d ", index);
488 print_value_flags (elttype);
489 printf_filtered ("\n");
490 }
491}
492
493void
494annotate_elt_rep (repcount)
495 unsigned int repcount;
496{
497 if (annotation_level > 1)
498 printf_filtered ("\n\032\032elt-rep %u\n", repcount);
499}
500
501void
502annotate_elt_rep_end ()
503{
504 if (annotation_level > 1)
505 printf_filtered ("\n\032\032elt-rep-end\n");
506}
507
508void
509annotate_elt ()
510{
511 if (annotation_level > 1)
512 printf_filtered ("\n\032\032elt\n");
513}
514
515void
516annotate_array_section_end ()
517{
518 if (annotation_level > 1)
519 printf_filtered ("\n\032\032array-section-end\n");
520}
521