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. */
25 #include "breakpoint.h"
27 static void print_value_flags
PARAMS ((struct type
*));
33 if (can_dereference (t
))
34 printf_filtered ("*");
36 printf_filtered ("-");
40 breakpoints_changed ()
42 if (annotation_level
> 1)
44 target_terminal_ours ();
45 printf_unfiltered ("\n\032\032breakpoints-invalid\n");
50 annotate_breakpoint (num
)
53 if (annotation_level
> 1)
54 printf_filtered ("\n\032\032breakpoint %d\n", num
);
58 annotate_watchpoint (num
)
61 if (annotation_level
> 1)
62 printf_filtered ("\n\032\032watchpoint %d\n", num
);
68 if (annotation_level
> 1)
70 printf_filtered ("\n\032\032starting\n");
77 if (annotation_level
> 1)
78 printf_filtered ("\n\032\032stopped\n");
82 annotate_exited (exitstatus
)
85 if (annotation_level
> 1)
86 printf_filtered ("\n\032\032exited %d\n", exitstatus
);
92 if (annotation_level
> 1)
93 printf_filtered ("\n\032\032signalled\n");
97 annotate_signal_name ()
99 if (annotation_level
> 1)
100 printf_filtered ("\n\032\032signal-name\n");
104 annotate_signal_name_end ()
106 if (annotation_level
> 1)
107 printf_filtered ("\n\032\032signal-name-end\n");
111 annotate_signal_string ()
113 if (annotation_level
> 1)
114 printf_filtered ("\n\032\032signal-string\n");
118 annotate_signal_string_end ()
120 if (annotation_level
> 1)
121 printf_filtered ("\n\032\032signal-string-end\n");
127 if (annotation_level
> 1)
128 printf_filtered ("\n\032\032signal\n");
132 annotate_breakpoints_headers ()
134 if (annotation_level
> 1)
135 printf_filtered ("\n\032\032breakpoints-headers\n");
142 if (annotation_level
> 1)
143 printf_filtered ("\n\032\032field %d\n", num
);
147 annotate_breakpoints_table ()
149 if (annotation_level
> 1)
150 printf_filtered ("\n\032\032breakpoints-table\n");
156 if (annotation_level
> 1)
157 printf_filtered ("\n\032\032record\n");
161 annotate_breakpoints_table_end ()
163 if (annotation_level
> 1)
164 printf_filtered ("\n\032\032breakpoints-table-end\n");
168 annotate_frames_invalid ()
170 if (annotation_level
> 1)
172 target_terminal_ours ();
173 printf_unfiltered ("\n\032\032frames-invalid\n");
178 annotate_field_begin (type
)
181 if (annotation_level
> 1)
183 printf_filtered ("\n\032\032field-begin ");
184 print_value_flags (type
);
185 printf_filtered ("\n");
190 annotate_field_name_end ()
192 if (annotation_level
> 1)
193 printf_filtered ("\n\032\032field-name-end\n");
197 annotate_field_value ()
199 if (annotation_level
> 1)
200 printf_filtered ("\n\032\032field-value\n");
204 annotate_field_end ()
206 if (annotation_level
> 1)
207 printf_filtered ("\n\032\032field-end\n");
213 if (annotation_level
> 1)
214 printf_filtered ("\n\032\032quit\n");
220 if (annotation_level
> 1)
221 printf_filtered ("\n\032\032error\n");
225 annotate_error_begin ()
227 if (annotation_level
> 1)
228 fprintf_filtered (gdb_stderr
, "\n\032\032error-begin\n");
232 annotate_value_history_begin (histindex
, type
)
236 if (annotation_level
> 1)
238 printf_filtered ("\n\032\032value-history-begin %d ", histindex
);
239 print_value_flags (type
);
240 printf_filtered ("\n");
245 annotate_value_begin (type
)
248 if (annotation_level
> 1)
250 printf_filtered ("\n\032\032value-begin ");
251 print_value_flags (type
);
252 printf_filtered ("\n");
257 annotate_value_history_value ()
259 if (annotation_level
> 1)
260 printf_filtered ("\n\032\032value-history-value\n");
264 annotate_value_history_end ()
266 if (annotation_level
> 1)
267 printf_filtered ("\n\032\032value-history-end\n");
271 annotate_value_end ()
273 if (annotation_level
> 1)
274 printf_filtered ("\n\032\032value-end\n");
278 annotate_display_begin ()
280 if (annotation_level
> 1)
281 printf_filtered ("\n\032\032display-begin\n");
285 annotate_display_number_end ()
287 if (annotation_level
> 1)
288 printf_filtered ("\n\032\032display-number-end\n");
292 annotate_display_format ()
294 if (annotation_level
> 1)
295 printf_filtered ("\n\032\032display-format\n");
299 annotate_display_expression ()
301 if (annotation_level
> 1)
302 printf_filtered ("\n\032\032display-expression\n");
306 annotate_display_expression_end ()
308 if (annotation_level
> 1)
309 printf_filtered ("\n\032\032display-expression-end\n");
313 annotate_display_value ()
315 if (annotation_level
> 1)
316 printf_filtered ("\n\032\032display-value\n");
320 annotate_display_end ()
322 if (annotation_level
> 1)
323 printf_filtered ("\n\032\032display-end\n");
327 annotate_arg_begin ()
329 if (annotation_level
> 1)
330 printf_filtered ("\n\032\032arg-begin\n");
334 annotate_arg_name_end ()
336 if (annotation_level
> 1)
337 printf_filtered ("\n\032\032arg-name-end\n");
341 annotate_arg_value (type
)
344 if (annotation_level
> 1)
346 printf_filtered ("\n\032\032arg-value ");
347 print_value_flags (type
);
348 printf_filtered ("\n");
355 if (annotation_level
> 1)
356 printf_filtered ("\n\032\032arg-end\n");
360 annotate_source (filename
, line
, character
, mid
, pc
)
367 if (annotation_level
> 1)
368 printf_filtered ("\n\032\032source ");
370 printf_filtered ("\032\032");
372 printf_filtered ("%s:%d:%d:%s:", filename
,
374 mid
? "middle" : "beg");
375 print_address_numeric (pc
, 0, gdb_stdout
);
376 printf_filtered ("\n");
380 annotate_frame_begin (level
, pc
)
384 if (annotation_level
> 1)
386 printf_filtered ("\n\032\032frame-begin %d ", level
);
387 print_address_numeric (pc
, 0, gdb_stdout
);
388 printf_filtered ("\n");
393 annotate_function_call ()
395 if (annotation_level
> 1)
396 printf_filtered ("\n\032\032function-call\n");
400 annotate_signal_handler_caller ()
402 if (annotation_level
> 1)
403 printf_filtered ("\n\032\032signal-handler-caller\n");
407 annotate_frame_address ()
409 if (annotation_level
> 1)
410 printf_filtered ("\n\032\032frame-address\n");
414 annotate_frame_address_end ()
416 if (annotation_level
> 1)
417 printf_filtered ("\n\032\032frame-address-end\n");
421 annotate_frame_function_name ()
423 if (annotation_level
> 1)
424 printf_filtered ("\n\032\032frame-function-name\n");
428 annotate_frame_args ()
430 if (annotation_level
> 1)
431 printf_filtered ("\n\032\032frame-args\n");
435 annotate_frame_source_begin ()
437 if (annotation_level
> 1)
438 printf_filtered ("\n\032\032frame-source-begin\n");
442 annotate_frame_source_file ()
444 if (annotation_level
> 1)
445 printf_filtered ("\n\032\032frame-source-file\n");
449 annotate_frame_source_file_end ()
451 if (annotation_level
> 1)
452 printf_filtered ("\n\032\032frame-source-file-end\n");
456 annotate_frame_source_line ()
458 if (annotation_level
> 1)
459 printf_filtered ("\n\032\032frame-source-line\n");
463 annotate_frame_source_end ()
465 if (annotation_level
> 1)
466 printf_filtered ("\n\032\032frame-source-end\n");
470 annotate_frame_where ()
472 if (annotation_level
> 1)
473 printf_filtered ("\n\032\032frame-where\n");
477 annotate_frame_end ()
479 if (annotation_level
> 1)
480 printf_filtered ("\n\032\032frame-end\n");
484 annotate_array_section_begin (index
, elttype
)
486 struct type
*elttype
;
488 if (annotation_level
> 1)
490 printf_filtered ("\n\032\032array-section-begin %d ", index
);
491 print_value_flags (elttype
);
492 printf_filtered ("\n");
497 annotate_elt_rep (repcount
)
498 unsigned int repcount
;
500 if (annotation_level
> 1)
501 printf_filtered ("\n\032\032elt-rep %u\n", repcount
);
505 annotate_elt_rep_end ()
507 if (annotation_level
> 1)
508 printf_filtered ("\n\032\032elt-rep-end\n");
514 if (annotation_level
> 1)
515 printf_filtered ("\n\032\032elt\n");
519 annotate_array_section_end ()
521 if (annotation_level
> 1)
522 printf_filtered ("\n\032\032array-section-end\n");
526 breakpoint_changed (b
)
527 struct breakpoint
*b
;
529 breakpoints_changed ();
533 _initialize_annotate ()
535 if (annotation_level
> 1)
537 delete_breakpoint_hook
= breakpoint_changed
;
538 modify_breakpoint_hook
= breakpoint_changed
;
This page took 0.039472 seconds and 4 git commands to generate.