3b4ab3c841117ce2de43b22d6d61ae0469f7540c
1 /* Annotation routines for GDB.
2 Copyright 1986, 89, 90, 91, 92, 95, 98, 1999 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 extern void _initialize_annotate
PARAMS ((void));
32 static void print_value_flags
PARAMS ((struct type
*));
34 static void breakpoint_changed
PARAMS ((struct breakpoint
*));
36 void (*annotate_starting_hook
) PARAMS ((void));
37 void (*annotate_stopped_hook
) PARAMS ((void));
38 void (*annotate_signalled_hook
) PARAMS ((void));
39 void (*annotate_signal_hook
) PARAMS ((void));
40 void (*annotate_exited_hook
) PARAMS ((void));
46 if (can_dereference (t
))
47 printf_filtered ("*");
49 printf_filtered ("-");
53 breakpoints_changed ()
55 if (annotation_level
> 1)
57 target_terminal_ours ();
58 printf_unfiltered ("\n\032\032breakpoints-invalid\n");
63 annotate_breakpoint (num
)
66 if (annotation_level
> 1)
67 printf_filtered ("\n\032\032breakpoint %d\n", num
);
71 annotate_catchpoint (num
)
74 if (annotation_level
> 1)
75 printf_filtered ("\n\032\032catchpoint %d\n", num
);
79 annotate_watchpoint (num
)
82 if (annotation_level
> 1)
83 printf_filtered ("\n\032\032watchpoint %d\n", num
);
90 if (annotate_starting_hook
)
91 annotate_starting_hook ();
94 if (annotation_level
> 1)
96 printf_filtered ("\n\032\032starting\n");
104 if (annotate_stopped_hook
)
105 annotate_stopped_hook ();
108 if (annotation_level
> 1)
109 printf_filtered ("\n\032\032stopped\n");
114 annotate_exited (exitstatus
)
117 if (annotate_exited_hook
)
118 annotate_exited_hook ();
121 if (annotation_level
> 1)
122 printf_filtered ("\n\032\032exited %d\n", exitstatus
);
127 annotate_signalled ()
129 if (annotate_signalled_hook
)
130 annotate_signalled_hook ();
132 if (annotation_level
> 1)
133 printf_filtered ("\n\032\032signalled\n");
137 annotate_signal_name ()
139 if (annotation_level
> 1)
140 printf_filtered ("\n\032\032signal-name\n");
144 annotate_signal_name_end ()
146 if (annotation_level
> 1)
147 printf_filtered ("\n\032\032signal-name-end\n");
151 annotate_signal_string ()
153 if (annotation_level
> 1)
154 printf_filtered ("\n\032\032signal-string\n");
158 annotate_signal_string_end ()
160 if (annotation_level
> 1)
161 printf_filtered ("\n\032\032signal-string-end\n");
167 if (annotate_signal_hook
)
168 annotate_signal_hook ();
170 if (annotation_level
> 1)
171 printf_filtered ("\n\032\032signal\n");
175 annotate_breakpoints_headers ()
177 if (annotation_level
> 1)
178 printf_filtered ("\n\032\032breakpoints-headers\n");
185 if (annotation_level
> 1)
186 printf_filtered ("\n\032\032field %d\n", num
);
190 annotate_breakpoints_table ()
192 if (annotation_level
> 1)
193 printf_filtered ("\n\032\032breakpoints-table\n");
199 if (annotation_level
> 1)
200 printf_filtered ("\n\032\032record\n");
204 annotate_breakpoints_table_end ()
206 if (annotation_level
> 1)
207 printf_filtered ("\n\032\032breakpoints-table-end\n");
211 annotate_frames_invalid ()
213 if (annotation_level
> 1)
215 target_terminal_ours ();
216 printf_unfiltered ("\n\032\032frames-invalid\n");
221 annotate_field_begin (type
)
224 if (annotation_level
> 1)
226 printf_filtered ("\n\032\032field-begin ");
227 print_value_flags (type
);
228 printf_filtered ("\n");
233 annotate_field_name_end ()
235 if (annotation_level
> 1)
236 printf_filtered ("\n\032\032field-name-end\n");
240 annotate_field_value ()
242 if (annotation_level
> 1)
243 printf_filtered ("\n\032\032field-value\n");
247 annotate_field_end ()
249 if (annotation_level
> 1)
250 printf_filtered ("\n\032\032field-end\n");
256 if (annotation_level
> 1)
257 printf_filtered ("\n\032\032quit\n");
263 if (annotation_level
> 1)
264 printf_filtered ("\n\032\032error\n");
268 annotate_error_begin ()
270 if (annotation_level
> 1)
271 fprintf_filtered (gdb_stderr
, "\n\032\032error-begin\n");
275 annotate_value_history_begin (histindex
, type
)
279 if (annotation_level
> 1)
281 printf_filtered ("\n\032\032value-history-begin %d ", histindex
);
282 print_value_flags (type
);
283 printf_filtered ("\n");
288 annotate_value_begin (type
)
291 if (annotation_level
> 1)
293 printf_filtered ("\n\032\032value-begin ");
294 print_value_flags (type
);
295 printf_filtered ("\n");
300 annotate_value_history_value ()
302 if (annotation_level
> 1)
303 printf_filtered ("\n\032\032value-history-value\n");
307 annotate_value_history_end ()
309 if (annotation_level
> 1)
310 printf_filtered ("\n\032\032value-history-end\n");
314 annotate_value_end ()
316 if (annotation_level
> 1)
317 printf_filtered ("\n\032\032value-end\n");
321 annotate_display_begin ()
323 if (annotation_level
> 1)
324 printf_filtered ("\n\032\032display-begin\n");
328 annotate_display_number_end ()
330 if (annotation_level
> 1)
331 printf_filtered ("\n\032\032display-number-end\n");
335 annotate_display_format ()
337 if (annotation_level
> 1)
338 printf_filtered ("\n\032\032display-format\n");
342 annotate_display_expression ()
344 if (annotation_level
> 1)
345 printf_filtered ("\n\032\032display-expression\n");
349 annotate_display_expression_end ()
351 if (annotation_level
> 1)
352 printf_filtered ("\n\032\032display-expression-end\n");
356 annotate_display_value ()
358 if (annotation_level
> 1)
359 printf_filtered ("\n\032\032display-value\n");
363 annotate_display_end ()
365 if (annotation_level
> 1)
366 printf_filtered ("\n\032\032display-end\n");
370 annotate_arg_begin ()
372 if (annotation_level
> 1)
373 printf_filtered ("\n\032\032arg-begin\n");
377 annotate_arg_name_end ()
379 if (annotation_level
> 1)
380 printf_filtered ("\n\032\032arg-name-end\n");
384 annotate_arg_value (type
)
387 if (annotation_level
> 1)
389 printf_filtered ("\n\032\032arg-value ");
390 print_value_flags (type
);
391 printf_filtered ("\n");
398 if (annotation_level
> 1)
399 printf_filtered ("\n\032\032arg-end\n");
403 annotate_source (filename
, line
, character
, mid
, pc
)
410 if (annotation_level
> 1)
411 printf_filtered ("\n\032\032source ");
413 printf_filtered ("\032\032");
415 printf_filtered ("%s:%d:%d:%s:0x", filename
,
417 mid
? "middle" : "beg");
418 print_address_numeric (pc
, 0, gdb_stdout
);
419 printf_filtered ("\n");
423 annotate_frame_begin (level
, pc
)
427 if (annotation_level
> 1)
429 printf_filtered ("\n\032\032frame-begin %d 0x", level
);
430 print_address_numeric (pc
, 0, gdb_stdout
);
431 printf_filtered ("\n");
436 annotate_function_call ()
438 if (annotation_level
> 1)
439 printf_filtered ("\n\032\032function-call\n");
443 annotate_signal_handler_caller ()
445 if (annotation_level
> 1)
446 printf_filtered ("\n\032\032signal-handler-caller\n");
450 annotate_frame_address ()
452 if (annotation_level
> 1)
453 printf_filtered ("\n\032\032frame-address\n");
457 annotate_frame_address_end ()
459 if (annotation_level
> 1)
460 printf_filtered ("\n\032\032frame-address-end\n");
464 annotate_frame_function_name ()
466 if (annotation_level
> 1)
467 printf_filtered ("\n\032\032frame-function-name\n");
471 annotate_frame_args ()
473 if (annotation_level
> 1)
474 printf_filtered ("\n\032\032frame-args\n");
478 annotate_frame_source_begin ()
480 if (annotation_level
> 1)
481 printf_filtered ("\n\032\032frame-source-begin\n");
485 annotate_frame_source_file ()
487 if (annotation_level
> 1)
488 printf_filtered ("\n\032\032frame-source-file\n");
492 annotate_frame_source_file_end ()
494 if (annotation_level
> 1)
495 printf_filtered ("\n\032\032frame-source-file-end\n");
499 annotate_frame_source_line ()
501 if (annotation_level
> 1)
502 printf_filtered ("\n\032\032frame-source-line\n");
506 annotate_frame_source_end ()
508 if (annotation_level
> 1)
509 printf_filtered ("\n\032\032frame-source-end\n");
513 annotate_frame_where ()
515 if (annotation_level
> 1)
516 printf_filtered ("\n\032\032frame-where\n");
520 annotate_frame_end ()
522 if (annotation_level
> 1)
523 printf_filtered ("\n\032\032frame-end\n");
527 annotate_array_section_begin (index
, elttype
)
529 struct type
*elttype
;
531 if (annotation_level
> 1)
533 printf_filtered ("\n\032\032array-section-begin %d ", index
);
534 print_value_flags (elttype
);
535 printf_filtered ("\n");
540 annotate_elt_rep (repcount
)
541 unsigned int repcount
;
543 if (annotation_level
> 1)
544 printf_filtered ("\n\032\032elt-rep %u\n", repcount
);
548 annotate_elt_rep_end ()
550 if (annotation_level
> 1)
551 printf_filtered ("\n\032\032elt-rep-end\n");
557 if (annotation_level
> 1)
558 printf_filtered ("\n\032\032elt\n");
562 annotate_array_section_end ()
564 if (annotation_level
> 1)
565 printf_filtered ("\n\032\032array-section-end\n");
569 breakpoint_changed (b
)
570 struct breakpoint
*b
;
572 breakpoints_changed ();
576 _initialize_annotate ()
578 if (annotation_level
> 1)
580 delete_breakpoint_hook
= breakpoint_changed
;
581 modify_breakpoint_hook
= breakpoint_changed
;
This page took 0.042688 seconds and 4 git commands to generate.