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 breakpoints_changed ()
28 if (annotation_level
> 1)
30 target_terminal_ours ();
31 printf_unfiltered ("\n\032\032breakpoints-invalid\n");
36 annotate_breakpoint (num
)
39 if (annotation_level
> 1)
40 printf_filtered ("\n\032\032breakpoint %d\n", num
);
44 annotate_watchpoint (num
)
47 if (annotation_level
> 1)
48 printf_filtered ("\n\032\032watchpoint %d\n", num
);
54 if (annotation_level
> 1)
55 printf_filtered ("\n\032\032starting\n");
61 if (annotation_level
> 1)
62 printf_filtered ("\n\032\032stopped\n");
66 annotate_exited (exitstatus
)
69 if (annotation_level
> 1)
70 printf_filtered ("\n\032\032exited %d\n", exitstatus
);
76 if (annotation_level
> 1)
77 printf_filtered ("\n\032\032signalled\n");
81 annotate_signal_name ()
83 if (annotation_level
> 1)
84 printf_filtered ("\n\032\032signal-name\n");
88 annotate_signal_name_end ()
90 if (annotation_level
> 1)
91 printf_filtered ("\n\032\032signal-name-end\n");
95 annotate_signal_string ()
97 if (annotation_level
> 1)
98 printf_filtered ("\n\032\032signal-string\n");
102 annotate_signal_string_end ()
104 if (annotation_level
> 1)
105 printf_filtered ("\n\032\032signal-string-end\n");
111 if (annotation_level
> 1)
112 printf_filtered ("\n\032\032signal\n");
116 annotate_breakpoints_headers ()
118 if (annotation_level
> 1)
119 printf_filtered ("\n\032\032breakpoints-headers\n");
126 if (annotation_level
> 1)
127 printf_filtered ("\n\032\032field %d\n", num
);
131 annotate_breakpoints_table ()
133 if (annotation_level
> 1)
134 printf_filtered ("\n\032\032breakpoints-table\n");
140 if (annotation_level
> 1)
141 printf_filtered ("\n\032\032record\n");
145 annotate_breakpoints_table_end ()
147 if (annotation_level
> 1)
148 printf_filtered ("\n\032\032breakpoints-table-end\n");
152 annotate_frames_invalid ()
154 if (annotation_level
> 1)
156 target_terminal_ours ();
157 printf_unfiltered ("\n\032\032frames-invalid\n");
162 annotate_field_begin (type
)
165 if (annotation_level
> 1)
167 printf_filtered ("\n\032\032field-begin ");
168 print_value_flags (type
);
169 printf_filtered ("\n");
174 annotate_field_name_end ()
176 if (annotation_level
> 1)
177 printf_filtered ("\n\032\032field-name-end\n");
181 annotate_field_value ()
183 if (annotation_level
> 1)
184 printf_filtered ("\n\032\032field-value\n");
188 annotate_field_end ()
190 if (annotation_level
> 1)
191 printf_filtered ("\n\032\032field-value\n");
197 if (annotation_level
> 1)
198 printf_filtered ("\n\032\032quit\n");
204 if (annotation_level
> 1)
205 printf_filtered ("\n\032\032error\n");
209 annotate_error_begin ()
211 if (annotation_level
> 1)
212 fprintf_filtered (gdb_stderr
, "\n\032\032error-begin\n");
216 annotate_value_history_begin (histindex
, type
)
220 if (annotation_level
> 1)
222 printf_filtered ("\n\032\032value-history-begin %d ", histindex
);
223 print_value_flags (type
);
224 printf_filtered ("\n");
229 annotate_value_begin (type
)
232 if (annotation_level
> 1)
234 printf_filtered ("\n\032\032value-begin ");
235 print_value_flags (type
);
236 printf_filtered ("\n");
241 annotate_value_history_value ()
243 if (annotation_level
> 1)
244 printf_filtered ("\n\032\032value-history-value\n");
248 annotate_value_history_end ()
250 if (annotation_level
> 1)
251 printf_filtered ("\n\032\032value-history-end\n");
255 annotate_value_end ()
257 if (annotation_level
> 1)
258 printf_filtered ("\n\032\032value-end\n");
262 annotate_display_begin ()
264 if (annotation_level
> 1)
265 printf_filtered ("\n\032\032display-begin\n");
269 annotate_display_number_end ()
271 if (annotation_level
> 1)
272 printf_filtered ("\n\032\032display-number-end\n");
276 annotate_display_format ()
278 if (annotation_level
> 1)
279 printf_filtered ("\n\032\032display-format\n");
283 annotate_display_expression ()
285 if (annotation_level
> 1)
286 printf_filtered ("\n\032\032display-expression\n");
290 annotate_display_expression_end ()
292 if (annotation_level
> 1)
293 printf_filtered ("\n\032\032display-expression-end\n");
297 annotate_display_value ()
299 if (annotation_level
> 1)
300 printf_filtered ("\n\032\032display-value\n");
304 annotate_display_end ()
306 if (annotation_level
> 1)
307 printf_filtered ("\n\032\032display-end\n");
311 annotate_arg_begin ()
313 if (annotation_level
> 1)
314 printf_filtered ("\n\032\032arg-begin\n");
318 annotate_arg_name_end ()
320 if (annotation_level
> 1)
321 printf_filtered ("\n\032\032arg-name-end\n");
325 annotate_arg_value (type
)
328 if (annotation_level
> 1)
330 printf_filtered ("\n\032\032arg-value ");
331 print_value_flags (type
);
332 printf_filtered ("\n");
339 if (annotation_level
> 1)
340 printf_filtered ("\n\032\032arg-end\n");
344 annotate_source (filename
, line
, character
, mid
, pc
)
351 if (annotation_level
> 1)
352 printf_filtered ("\n\032\032source ");
354 printf_filtered ("\032\032");
356 printf_filtered ("%s:%d:%d:%s:", filename
,
358 mid
? "middle" : "beg");
359 print_address_numeric (pc
, 0, gdb_stdout
);
360 printf_filtered ("\n");
364 annotate_frame_begin (level
, pc
)
368 if (annotation_level
> 1)
370 printf_filtered ("\n\032\032frame-begin %d ", level
);
371 print_address_numeric (pc
, 0, gdb_stdout
);
372 printf_filtered ("\n");
377 annotate_function_call ()
379 if (annotation_level
> 1)
380 printf_filtered ("\n\032\032function-call\n");
384 annotate_signal_handler_caller ()
386 if (annotation_level
> 1)
387 printf_filtered ("\n\032\032signal-handler-caller\n");
391 annotate_frame_address ()
393 if (annotation_level
> 1)
394 printf_filtered ("\n\032\032frame-address\n");
398 annotate_frame_address_end ()
400 if (annotation_level
> 1)
401 printf_filtered ("\n\032\032frame-address-end\n");
405 annotate_frame_function_name ()
407 if (annotation_level
> 1)
408 printf_filtered ("\n\032\032frame-function-name\n");
412 annotate_frame_args ()
414 if (annotation_level
> 1)
415 printf_filtered ("\n\032\032frame-args\n");
419 annotate_frame_source_begin ()
421 if (annotation_level
> 1)
422 printf_filtered ("\n\032\032frame-source-begin\n");
426 annotate_frame_source_file ()
428 if (annotation_level
> 1)
429 printf_filtered ("\n\032\032frame-source-file\n");
433 annotate_frame_source_file_end ()
435 if (annotation_level
> 1)
436 printf_filtered ("\n\032\032frame-source-file-end\n");
440 annotate_frame_source_line ()
442 if (annotation_level
> 1)
443 printf_filtered ("\n\032\032frame-source-line\n");
447 annotate_frame_source_end ()
449 if (annotation_level
> 1)
450 printf_filtered ("\n\032\032frame-source-end\n");
454 annotate_frame_where ()
456 if (annotation_level
> 1)
457 printf_filtered ("\n\032\032frame-where\n");
461 annotate_frame_end ()
463 if (annotation_level
> 1)
464 printf_filtered ("\n\032\032frame-end\n");
468 annotate_array_section_begin (index
, elttype
)
470 struct type
*elttype
;
472 if (annotation_level
> 1)
474 printf_filtered ("\n\032\032array-section-begin %d ", index
);
475 print_value_flags (elttype
);
476 printf_filtered ("\n");
481 annotate_elt_rep (repcount
)
482 unsigned int repcount
;
484 if (annotation_level
> 1)
485 printf_filtered ("\n\032\032elt-rep %u\n", repcount
);
489 annotate_elt_rep_end ()
491 if (annotation_level
> 1)
492 printf_filtered ("\n\032\032elt-rep-end\n");
498 if (annotation_level
> 1)
499 printf_filtered ("\n\032\032elt\n");
503 annotate_array_section_end ()
505 if (annotation_level
> 1)
506 printf_filtered ("\n\032\032array-section-end\n");