1 /* Annotation routines for GDB.
2 Copyright 1986, 89, 90, 91, 92, 95, 1998 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
25 #include "breakpoint.h"
28 /* Prototypes for local functions. */
30 static void print_value_flags
PARAMS ((struct type
*));
32 static void breakpoint_changed
PARAMS ((struct breakpoint
*));
34 void (*annotate_starting_hook
) PARAMS ((void));
35 void (*annotate_stopped_hook
) PARAMS ((void));
36 void (*annotate_signalled_hook
) PARAMS ((void));
37 void (*annotate_exited_hook
) PARAMS ((void));
43 if (can_dereference (t
))
44 printf_filtered ("*");
46 printf_filtered ("-");
50 breakpoints_changed ()
52 if (annotation_level
> 1)
54 target_terminal_ours ();
55 printf_unfiltered ("\n\032\032breakpoints-invalid\n");
60 annotate_breakpoint (num
)
63 if (annotation_level
> 1)
64 printf_filtered ("\n\032\032breakpoint %d\n", num
);
68 annotate_catchpoint (num
)
71 if (annotation_level
> 1)
72 printf_filtered ("\n\032\032catchpoint %d\n", num
);
76 annotate_watchpoint (num
)
79 if (annotation_level
> 1)
80 printf_filtered ("\n\032\032watchpoint %d\n", num
);
87 if (annotate_starting_hook
)
88 annotate_starting_hook ();
91 if (annotation_level
> 1)
93 printf_filtered ("\n\032\032starting\n");
101 if (annotate_stopped_hook
)
102 annotate_stopped_hook ();
105 if (annotation_level
> 1)
106 printf_filtered ("\n\032\032stopped\n");
111 annotate_exited (exitstatus
)
114 if (annotate_exited_hook
)
115 annotate_exited_hook ();
118 if (annotation_level
> 1)
119 printf_filtered ("\n\032\032exited %d\n", exitstatus
);
124 annotate_signalled ()
126 if (annotate_signalled_hook
)
127 annotate_signalled_hook ();
129 if (annotation_level
> 1)
130 printf_filtered ("\n\032\032signalled\n");
134 annotate_signal_name ()
136 if (annotation_level
> 1)
137 printf_filtered ("\n\032\032signal-name\n");
141 annotate_signal_name_end ()
143 if (annotation_level
> 1)
144 printf_filtered ("\n\032\032signal-name-end\n");
148 annotate_signal_string ()
150 if (annotation_level
> 1)
151 printf_filtered ("\n\032\032signal-string\n");
155 annotate_signal_string_end ()
157 if (annotation_level
> 1)
158 printf_filtered ("\n\032\032signal-string-end\n");
164 if (annotation_level
> 1)
165 printf_filtered ("\n\032\032signal\n");
169 annotate_breakpoints_headers ()
171 if (annotation_level
> 1)
172 printf_filtered ("\n\032\032breakpoints-headers\n");
179 if (annotation_level
> 1)
180 printf_filtered ("\n\032\032field %d\n", num
);
184 annotate_breakpoints_table ()
186 if (annotation_level
> 1)
187 printf_filtered ("\n\032\032breakpoints-table\n");
193 if (annotation_level
> 1)
194 printf_filtered ("\n\032\032record\n");
198 annotate_breakpoints_table_end ()
200 if (annotation_level
> 1)
201 printf_filtered ("\n\032\032breakpoints-table-end\n");
205 annotate_frames_invalid ()
207 if (annotation_level
> 1)
209 target_terminal_ours ();
210 printf_unfiltered ("\n\032\032frames-invalid\n");
215 annotate_field_begin (type
)
218 if (annotation_level
> 1)
220 printf_filtered ("\n\032\032field-begin ");
221 print_value_flags (type
);
222 printf_filtered ("\n");
227 annotate_field_name_end ()
229 if (annotation_level
> 1)
230 printf_filtered ("\n\032\032field-name-end\n");
234 annotate_field_value ()
236 if (annotation_level
> 1)
237 printf_filtered ("\n\032\032field-value\n");
241 annotate_field_end ()
243 if (annotation_level
> 1)
244 printf_filtered ("\n\032\032field-end\n");
250 if (annotation_level
> 1)
251 printf_filtered ("\n\032\032quit\n");
257 if (annotation_level
> 1)
258 printf_filtered ("\n\032\032error\n");
262 annotate_error_begin ()
264 if (annotation_level
> 1)
265 fprintf_filtered (gdb_stderr
, "\n\032\032error-begin\n");
269 annotate_value_history_begin (histindex
, type
)
273 if (annotation_level
> 1)
275 printf_filtered ("\n\032\032value-history-begin %d ", histindex
);
276 print_value_flags (type
);
277 printf_filtered ("\n");
282 annotate_value_begin (type
)
285 if (annotation_level
> 1)
287 printf_filtered ("\n\032\032value-begin ");
288 print_value_flags (type
);
289 printf_filtered ("\n");
294 annotate_value_history_value ()
296 if (annotation_level
> 1)
297 printf_filtered ("\n\032\032value-history-value\n");
301 annotate_value_history_end ()
303 if (annotation_level
> 1)
304 printf_filtered ("\n\032\032value-history-end\n");
308 annotate_value_end ()
310 if (annotation_level
> 1)
311 printf_filtered ("\n\032\032value-end\n");
315 annotate_display_begin ()
317 if (annotation_level
> 1)
318 printf_filtered ("\n\032\032display-begin\n");
322 annotate_display_number_end ()
324 if (annotation_level
> 1)
325 printf_filtered ("\n\032\032display-number-end\n");
329 annotate_display_format ()
331 if (annotation_level
> 1)
332 printf_filtered ("\n\032\032display-format\n");
336 annotate_display_expression ()
338 if (annotation_level
> 1)
339 printf_filtered ("\n\032\032display-expression\n");
343 annotate_display_expression_end ()
345 if (annotation_level
> 1)
346 printf_filtered ("\n\032\032display-expression-end\n");
350 annotate_display_value ()
352 if (annotation_level
> 1)
353 printf_filtered ("\n\032\032display-value\n");
357 annotate_display_end ()
359 if (annotation_level
> 1)
360 printf_filtered ("\n\032\032display-end\n");
364 annotate_arg_begin ()
366 if (annotation_level
> 1)
367 printf_filtered ("\n\032\032arg-begin\n");
371 annotate_arg_name_end ()
373 if (annotation_level
> 1)
374 printf_filtered ("\n\032\032arg-name-end\n");
378 annotate_arg_value (type
)
381 if (annotation_level
> 1)
383 printf_filtered ("\n\032\032arg-value ");
384 print_value_flags (type
);
385 printf_filtered ("\n");
392 if (annotation_level
> 1)
393 printf_filtered ("\n\032\032arg-end\n");
397 annotate_source (filename
, line
, character
, mid
, pc
)
404 if (annotation_level
> 1)
405 printf_filtered ("\n\032\032source ");
407 printf_filtered ("\032\032");
409 printf_filtered ("%s:%d:%d:%s:0x", filename
,
411 mid
? "middle" : "beg");
412 print_address_numeric (pc
, 0, gdb_stdout
);
413 printf_filtered ("\n");
417 annotate_frame_begin (level
, pc
)
421 if (annotation_level
> 1)
423 printf_filtered ("\n\032\032frame-begin %d 0x", level
);
424 print_address_numeric (pc
, 0, gdb_stdout
);
425 printf_filtered ("\n");
430 annotate_function_call ()
432 if (annotation_level
> 1)
433 printf_filtered ("\n\032\032function-call\n");
437 annotate_signal_handler_caller ()
439 if (annotation_level
> 1)
440 printf_filtered ("\n\032\032signal-handler-caller\n");
444 annotate_frame_address ()
446 if (annotation_level
> 1)
447 printf_filtered ("\n\032\032frame-address\n");
451 annotate_frame_address_end ()
453 if (annotation_level
> 1)
454 printf_filtered ("\n\032\032frame-address-end\n");
458 annotate_frame_function_name ()
460 if (annotation_level
> 1)
461 printf_filtered ("\n\032\032frame-function-name\n");
465 annotate_frame_args ()
467 if (annotation_level
> 1)
468 printf_filtered ("\n\032\032frame-args\n");
472 annotate_frame_source_begin ()
474 if (annotation_level
> 1)
475 printf_filtered ("\n\032\032frame-source-begin\n");
479 annotate_frame_source_file ()
481 if (annotation_level
> 1)
482 printf_filtered ("\n\032\032frame-source-file\n");
486 annotate_frame_source_file_end ()
488 if (annotation_level
> 1)
489 printf_filtered ("\n\032\032frame-source-file-end\n");
493 annotate_frame_source_line ()
495 if (annotation_level
> 1)
496 printf_filtered ("\n\032\032frame-source-line\n");
500 annotate_frame_source_end ()
502 if (annotation_level
> 1)
503 printf_filtered ("\n\032\032frame-source-end\n");
507 annotate_frame_where ()
509 if (annotation_level
> 1)
510 printf_filtered ("\n\032\032frame-where\n");
514 annotate_frame_end ()
516 if (annotation_level
> 1)
517 printf_filtered ("\n\032\032frame-end\n");
521 annotate_array_section_begin (index
, elttype
)
523 struct type
*elttype
;
525 if (annotation_level
> 1)
527 printf_filtered ("\n\032\032array-section-begin %d ", index
);
528 print_value_flags (elttype
);
529 printf_filtered ("\n");
534 annotate_elt_rep (repcount
)
535 unsigned int repcount
;
537 if (annotation_level
> 1)
538 printf_filtered ("\n\032\032elt-rep %u\n", repcount
);
542 annotate_elt_rep_end ()
544 if (annotation_level
> 1)
545 printf_filtered ("\n\032\032elt-rep-end\n");
551 if (annotation_level
> 1)
552 printf_filtered ("\n\032\032elt\n");
556 annotate_array_section_end ()
558 if (annotation_level
> 1)
559 printf_filtered ("\n\032\032array-section-end\n");
563 breakpoint_changed (b
)
564 struct breakpoint
*b
;
566 breakpoints_changed ();
570 _initialize_annotate ()
572 if (annotation_level
> 1)
574 delete_breakpoint_hook
= breakpoint_changed
;
575 modify_breakpoint_hook
= breakpoint_changed
;
This page took 0.040943 seconds and 4 git commands to generate.