1 /* Annotation routines for GDB.
2 Copyright 1986, 1989, 1990, 1991, 1992, 1995 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"
27 static void print_value_flags
PARAMS ((struct type
*));
28 static void breakpoint_changed
PARAMS ((struct breakpoint
*));
34 if (can_dereference (t
))
35 printf_filtered ("*");
37 printf_filtered ("-");
41 breakpoints_changed ()
43 if (annotation_level
> 1)
45 target_terminal_ours ();
46 printf_unfiltered ("\n\032\032breakpoints-invalid\n");
51 annotate_breakpoint (num
)
54 if (annotation_level
> 1)
55 printf_filtered ("\n\032\032breakpoint %d\n", num
);
59 annotate_watchpoint (num
)
62 if (annotation_level
> 1)
63 printf_filtered ("\n\032\032watchpoint %d\n", num
);
69 if (annotation_level
> 1)
71 printf_filtered ("\n\032\032starting\n");
78 if (annotation_level
> 1)
79 printf_filtered ("\n\032\032stopped\n");
83 annotate_exited (exitstatus
)
86 if (annotation_level
> 1)
87 printf_filtered ("\n\032\032exited %d\n", exitstatus
);
93 if (annotation_level
> 1)
94 printf_filtered ("\n\032\032signalled\n");
98 annotate_signal_name ()
100 if (annotation_level
> 1)
101 printf_filtered ("\n\032\032signal-name\n");
105 annotate_signal_name_end ()
107 if (annotation_level
> 1)
108 printf_filtered ("\n\032\032signal-name-end\n");
112 annotate_signal_string ()
114 if (annotation_level
> 1)
115 printf_filtered ("\n\032\032signal-string\n");
119 annotate_signal_string_end ()
121 if (annotation_level
> 1)
122 printf_filtered ("\n\032\032signal-string-end\n");
128 if (annotation_level
> 1)
129 printf_filtered ("\n\032\032signal\n");
133 annotate_breakpoints_headers ()
135 if (annotation_level
> 1)
136 printf_filtered ("\n\032\032breakpoints-headers\n");
143 if (annotation_level
> 1)
144 printf_filtered ("\n\032\032field %d\n", num
);
148 annotate_breakpoints_table ()
150 if (annotation_level
> 1)
151 printf_filtered ("\n\032\032breakpoints-table\n");
157 if (annotation_level
> 1)
158 printf_filtered ("\n\032\032record\n");
162 annotate_breakpoints_table_end ()
164 if (annotation_level
> 1)
165 printf_filtered ("\n\032\032breakpoints-table-end\n");
169 annotate_frames_invalid ()
171 if (annotation_level
> 1)
173 target_terminal_ours ();
174 printf_unfiltered ("\n\032\032frames-invalid\n");
179 annotate_field_begin (type
)
182 if (annotation_level
> 1)
184 printf_filtered ("\n\032\032field-begin ");
185 print_value_flags (type
);
186 printf_filtered ("\n");
191 annotate_field_name_end ()
193 if (annotation_level
> 1)
194 printf_filtered ("\n\032\032field-name-end\n");
198 annotate_field_value ()
200 if (annotation_level
> 1)
201 printf_filtered ("\n\032\032field-value\n");
205 annotate_field_end ()
207 if (annotation_level
> 1)
208 printf_filtered ("\n\032\032field-end\n");
214 if (annotation_level
> 1)
215 printf_filtered ("\n\032\032quit\n");
221 if (annotation_level
> 1)
222 printf_filtered ("\n\032\032error\n");
226 annotate_error_begin ()
228 if (annotation_level
> 1)
229 fprintf_filtered (gdb_stderr
, "\n\032\032error-begin\n");
233 annotate_value_history_begin (histindex
, type
)
237 if (annotation_level
> 1)
239 printf_filtered ("\n\032\032value-history-begin %d ", histindex
);
240 print_value_flags (type
);
241 printf_filtered ("\n");
246 annotate_value_begin (type
)
249 if (annotation_level
> 1)
251 printf_filtered ("\n\032\032value-begin ");
252 print_value_flags (type
);
253 printf_filtered ("\n");
258 annotate_value_history_value ()
260 if (annotation_level
> 1)
261 printf_filtered ("\n\032\032value-history-value\n");
265 annotate_value_history_end ()
267 if (annotation_level
> 1)
268 printf_filtered ("\n\032\032value-history-end\n");
272 annotate_value_end ()
274 if (annotation_level
> 1)
275 printf_filtered ("\n\032\032value-end\n");
279 annotate_display_begin ()
281 if (annotation_level
> 1)
282 printf_filtered ("\n\032\032display-begin\n");
286 annotate_display_number_end ()
288 if (annotation_level
> 1)
289 printf_filtered ("\n\032\032display-number-end\n");
293 annotate_display_format ()
295 if (annotation_level
> 1)
296 printf_filtered ("\n\032\032display-format\n");
300 annotate_display_expression ()
302 if (annotation_level
> 1)
303 printf_filtered ("\n\032\032display-expression\n");
307 annotate_display_expression_end ()
309 if (annotation_level
> 1)
310 printf_filtered ("\n\032\032display-expression-end\n");
314 annotate_display_value ()
316 if (annotation_level
> 1)
317 printf_filtered ("\n\032\032display-value\n");
321 annotate_display_end ()
323 if (annotation_level
> 1)
324 printf_filtered ("\n\032\032display-end\n");
328 annotate_arg_begin ()
330 if (annotation_level
> 1)
331 printf_filtered ("\n\032\032arg-begin\n");
335 annotate_arg_name_end ()
337 if (annotation_level
> 1)
338 printf_filtered ("\n\032\032arg-name-end\n");
342 annotate_arg_value (type
)
345 if (annotation_level
> 1)
347 printf_filtered ("\n\032\032arg-value ");
348 print_value_flags (type
);
349 printf_filtered ("\n");
356 if (annotation_level
> 1)
357 printf_filtered ("\n\032\032arg-end\n");
361 annotate_source (filename
, line
, character
, mid
, pc
)
368 if (annotation_level
> 1)
369 printf_filtered ("\n\032\032source ");
371 printf_filtered ("\032\032");
373 printf_filtered ("%s:%d:%d:%s:0x", filename
,
375 mid
? "middle" : "beg");
376 print_address_numeric (pc
, 0, gdb_stdout
);
377 printf_filtered ("\n");
381 annotate_frame_begin (level
, pc
)
385 if (annotation_level
> 1)
387 printf_filtered ("\n\032\032frame-begin %d 0x", level
);
388 print_address_numeric (pc
, 0, gdb_stdout
);
389 printf_filtered ("\n");
394 annotate_function_call ()
396 if (annotation_level
> 1)
397 printf_filtered ("\n\032\032function-call\n");
401 annotate_signal_handler_caller ()
403 if (annotation_level
> 1)
404 printf_filtered ("\n\032\032signal-handler-caller\n");
408 annotate_frame_address ()
410 if (annotation_level
> 1)
411 printf_filtered ("\n\032\032frame-address\n");
415 annotate_frame_address_end ()
417 if (annotation_level
> 1)
418 printf_filtered ("\n\032\032frame-address-end\n");
422 annotate_frame_function_name ()
424 if (annotation_level
> 1)
425 printf_filtered ("\n\032\032frame-function-name\n");
429 annotate_frame_args ()
431 if (annotation_level
> 1)
432 printf_filtered ("\n\032\032frame-args\n");
436 annotate_frame_source_begin ()
438 if (annotation_level
> 1)
439 printf_filtered ("\n\032\032frame-source-begin\n");
443 annotate_frame_source_file ()
445 if (annotation_level
> 1)
446 printf_filtered ("\n\032\032frame-source-file\n");
450 annotate_frame_source_file_end ()
452 if (annotation_level
> 1)
453 printf_filtered ("\n\032\032frame-source-file-end\n");
457 annotate_frame_source_line ()
459 if (annotation_level
> 1)
460 printf_filtered ("\n\032\032frame-source-line\n");
464 annotate_frame_source_end ()
466 if (annotation_level
> 1)
467 printf_filtered ("\n\032\032frame-source-end\n");
471 annotate_frame_where ()
473 if (annotation_level
> 1)
474 printf_filtered ("\n\032\032frame-where\n");
478 annotate_frame_end ()
480 if (annotation_level
> 1)
481 printf_filtered ("\n\032\032frame-end\n");
485 annotate_array_section_begin (index
, elttype
)
487 struct type
*elttype
;
489 if (annotation_level
> 1)
491 printf_filtered ("\n\032\032array-section-begin %d ", index
);
492 print_value_flags (elttype
);
493 printf_filtered ("\n");
498 annotate_elt_rep (repcount
)
499 unsigned int repcount
;
501 if (annotation_level
> 1)
502 printf_filtered ("\n\032\032elt-rep %u\n", repcount
);
506 annotate_elt_rep_end ()
508 if (annotation_level
> 1)
509 printf_filtered ("\n\032\032elt-rep-end\n");
515 if (annotation_level
> 1)
516 printf_filtered ("\n\032\032elt\n");
520 annotate_array_section_end ()
522 if (annotation_level
> 1)
523 printf_filtered ("\n\032\032array-section-end\n");
527 breakpoint_changed (b
)
528 struct breakpoint
*b
;
530 breakpoints_changed ();
534 _initialize_annotate ()
536 if (annotation_level
> 1)
538 delete_breakpoint_hook
= breakpoint_changed
;
539 modify_breakpoint_hook
= breakpoint_changed
;
This page took 0.039473 seconds and 4 git commands to generate.