1 /* Annotation routines for GDB.
2 Copyright 1986, 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
4 This file is part of GDB.
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 2 of the License, or
9 (at your option) any later version.
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.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
26 static void print_value_flags PARAMS ((struct type *));
32 if (can_dereference (t))
33 printf_filtered ("*");
35 printf_filtered ("-");
39 breakpoints_changed ()
41 if (annotation_level > 1)
43 target_terminal_ours ();
44 printf_unfiltered ("\n\032\032breakpoints-invalid\n");
49 annotate_breakpoint (num)
52 if (annotation_level > 1)
53 printf_filtered ("\n\032\032breakpoint %d\n", num);
57 annotate_watchpoint (num)
60 if (annotation_level > 1)
61 printf_filtered ("\n\032\032watchpoint %d\n", num);
67 if (annotation_level > 1)
68 printf_filtered ("\n\032\032starting\n");
74 if (annotation_level > 1)
75 printf_filtered ("\n\032\032stopped\n");
79 annotate_exited (exitstatus)
82 if (annotation_level > 1)
83 printf_filtered ("\n\032\032exited %d\n", exitstatus);
89 if (annotation_level > 1)
90 printf_filtered ("\n\032\032signalled\n");
94 annotate_signal_name ()
96 if (annotation_level > 1)
97 printf_filtered ("\n\032\032signal-name\n");
101 annotate_signal_name_end ()
103 if (annotation_level > 1)
104 printf_filtered ("\n\032\032signal-name-end\n");
108 annotate_signal_string ()
110 if (annotation_level > 1)
111 printf_filtered ("\n\032\032signal-string\n");
115 annotate_signal_string_end ()
117 if (annotation_level > 1)
118 printf_filtered ("\n\032\032signal-string-end\n");
124 if (annotation_level > 1)
125 printf_filtered ("\n\032\032signal\n");
129 annotate_breakpoints_headers ()
131 if (annotation_level > 1)
132 printf_filtered ("\n\032\032breakpoints-headers\n");
139 if (annotation_level > 1)
140 printf_filtered ("\n\032\032field %d\n", num);
144 annotate_breakpoints_table ()
146 if (annotation_level > 1)
147 printf_filtered ("\n\032\032breakpoints-table\n");
153 if (annotation_level > 1)
154 printf_filtered ("\n\032\032record\n");
158 annotate_breakpoints_table_end ()
160 if (annotation_level > 1)
161 printf_filtered ("\n\032\032breakpoints-table-end\n");
165 annotate_frames_invalid ()
167 if (annotation_level > 1)
169 target_terminal_ours ();
170 printf_unfiltered ("\n\032\032frames-invalid\n");
175 annotate_field_begin (type)
178 if (annotation_level > 1)
180 printf_filtered ("\n\032\032field-begin ");
181 print_value_flags (type);
182 printf_filtered ("\n");
187 annotate_field_name_end ()
189 if (annotation_level > 1)
190 printf_filtered ("\n\032\032field-name-end\n");
194 annotate_field_value ()
196 if (annotation_level > 1)
197 printf_filtered ("\n\032\032field-value\n");
201 annotate_field_end ()
203 if (annotation_level > 1)
204 printf_filtered ("\n\032\032field-end\n");
210 if (annotation_level > 1)
211 printf_filtered ("\n\032\032quit\n");
217 if (annotation_level > 1)
218 printf_filtered ("\n\032\032error\n");
222 annotate_error_begin ()
224 if (annotation_level > 1)
225 fprintf_filtered (gdb_stderr, "\n\032\032error-begin\n");
229 annotate_value_history_begin (histindex, type)
233 if (annotation_level > 1)
235 printf_filtered ("\n\032\032value-history-begin %d ", histindex);
236 print_value_flags (type);
237 printf_filtered ("\n");
242 annotate_value_begin (type)
245 if (annotation_level > 1)
247 printf_filtered ("\n\032\032value-begin ");
248 print_value_flags (type);
249 printf_filtered ("\n");
254 annotate_value_history_value ()
256 if (annotation_level > 1)
257 printf_filtered ("\n\032\032value-history-value\n");
261 annotate_value_history_end ()
263 if (annotation_level > 1)
264 printf_filtered ("\n\032\032value-history-end\n");
268 annotate_value_end ()
270 if (annotation_level > 1)
271 printf_filtered ("\n\032\032value-end\n");
275 annotate_display_begin ()
277 if (annotation_level > 1)
278 printf_filtered ("\n\032\032display-begin\n");
282 annotate_display_number_end ()
284 if (annotation_level > 1)
285 printf_filtered ("\n\032\032display-number-end\n");
289 annotate_display_format ()
291 if (annotation_level > 1)
292 printf_filtered ("\n\032\032display-format\n");
296 annotate_display_expression ()
298 if (annotation_level > 1)
299 printf_filtered ("\n\032\032display-expression\n");
303 annotate_display_expression_end ()
305 if (annotation_level > 1)
306 printf_filtered ("\n\032\032display-expression-end\n");
310 annotate_display_value ()
312 if (annotation_level > 1)
313 printf_filtered ("\n\032\032display-value\n");
317 annotate_display_end ()
319 if (annotation_level > 1)
320 printf_filtered ("\n\032\032display-end\n");
324 annotate_arg_begin ()
326 if (annotation_level > 1)
327 printf_filtered ("\n\032\032arg-begin\n");
331 annotate_arg_name_end ()
333 if (annotation_level > 1)
334 printf_filtered ("\n\032\032arg-name-end\n");
338 annotate_arg_value (type)
341 if (annotation_level > 1)
343 printf_filtered ("\n\032\032arg-value ");
344 print_value_flags (type);
345 printf_filtered ("\n");
352 if (annotation_level > 1)
353 printf_filtered ("\n\032\032arg-end\n");
357 annotate_source (filename, line, character, mid, pc)
364 if (annotation_level > 1)
365 printf_filtered ("\n\032\032source ");
367 printf_filtered ("\032\032");
369 printf_filtered ("%s:%d:%d:%s:", filename,
371 mid ? "middle" : "beg");
372 print_address_numeric (pc, 0, gdb_stdout);
373 printf_filtered ("\n");
377 annotate_frame_begin (level, pc)
381 if (annotation_level > 1)
383 printf_filtered ("\n\032\032frame-begin %d ", level);
384 print_address_numeric (pc, 0, gdb_stdout);
385 printf_filtered ("\n");
390 annotate_function_call ()
392 if (annotation_level > 1)
393 printf_filtered ("\n\032\032function-call\n");
397 annotate_signal_handler_caller ()
399 if (annotation_level > 1)
400 printf_filtered ("\n\032\032signal-handler-caller\n");
404 annotate_frame_address ()
406 if (annotation_level > 1)
407 printf_filtered ("\n\032\032frame-address\n");
411 annotate_frame_address_end ()
413 if (annotation_level > 1)
414 printf_filtered ("\n\032\032frame-address-end\n");
418 annotate_frame_function_name ()
420 if (annotation_level > 1)
421 printf_filtered ("\n\032\032frame-function-name\n");
425 annotate_frame_args ()
427 if (annotation_level > 1)
428 printf_filtered ("\n\032\032frame-args\n");
432 annotate_frame_source_begin ()
434 if (annotation_level > 1)
435 printf_filtered ("\n\032\032frame-source-begin\n");
439 annotate_frame_source_file ()
441 if (annotation_level > 1)
442 printf_filtered ("\n\032\032frame-source-file\n");
446 annotate_frame_source_file_end ()
448 if (annotation_level > 1)
449 printf_filtered ("\n\032\032frame-source-file-end\n");
453 annotate_frame_source_line ()
455 if (annotation_level > 1)
456 printf_filtered ("\n\032\032frame-source-line\n");
460 annotate_frame_source_end ()
462 if (annotation_level > 1)
463 printf_filtered ("\n\032\032frame-source-end\n");
467 annotate_frame_where ()
469 if (annotation_level > 1)
470 printf_filtered ("\n\032\032frame-where\n");
474 annotate_frame_end ()
476 if (annotation_level > 1)
477 printf_filtered ("\n\032\032frame-end\n");
481 annotate_array_section_begin (index, elttype)
483 struct type *elttype;
485 if (annotation_level > 1)
487 printf_filtered ("\n\032\032array-section-begin %d ", index);
488 print_value_flags (elttype);
489 printf_filtered ("\n");
494 annotate_elt_rep (repcount)
495 unsigned int repcount;
497 if (annotation_level > 1)
498 printf_filtered ("\n\032\032elt-rep %u\n", repcount);
502 annotate_elt_rep_end ()
504 if (annotation_level > 1)
505 printf_filtered ("\n\032\032elt-rep-end\n");
511 if (annotation_level > 1)
512 printf_filtered ("\n\032\032elt\n");
516 annotate_array_section_end ()
518 if (annotation_level > 1)
519 printf_filtered ("\n\032\032array-section-end\n");