* breakpoint.c (watchpoint_check): Remove unused variable b.
* stack.c (print_frame_info): Move sp and buf inside #if.
* eval.c (evaluate_subexp): Remove unused variables pp,
mangle_ptr, ptr, and mangle_tstr.
* valarith.c (value_x_binop): Remove unused variables mangle_tstr
and mangle_ptr.
* symtab.c (lookup_symtab): Put variable copy inside #if.
(decode_line_1): Put variable q1 inside #if 0.
* target.h: Declare target_link.
* infrun.c (wait_for_inferior): Remove unused variables signame.
* remote.c (remote_resume): Remove unused variable name.
* c-exp.y (parse_number): Parenthesize operand of shift.
* dbxread.c (record_minimal_symbol): Parenthesize operand of &&
(this is a semantic change, the warning seems to have detected a bug).
* dbxread.c (end_psymtab): Move variable p1 inside #if.
* coffread.c: Move variable temptype inside #if.
* ch-typeprint.c (chill_type_print_base): Remove unused variable
name.
* ch-valprint.c: #include typeprint.h and ch-lang.h.
(chill_val_print): Remove unused variable in_range.
(chill_val_print): Remove statement "length > TYPE_LENGTH (type);".
(chill_val_print): Add default case for switch.
* stabsread.h: Declare stabsect_build_psymtabs.
* os9kread.c (read_minimal_symbols): Make this return void.
(os9k_symfile_read): Remove unused variables stb_exist and val.
(os9k_symfile_init): Remove unused variable val.
(fill_sym): Remove unused variable id.
(read_os9k_psymtab): Put variable back_to inside #if 0. Remove
unused variable nsl.
Remove unused variable symfile_bfd.
#if 0 unused variables lbrac_unmatched_complaint and
lbrac_mismatch_complaint.
Remove declaration for non-existent function os9k_next_symbol_text.
* annotate.c, annotate.h: New files, containing a function for
each annotation which outputs it.
* Move breakpoints_changed from breakpoint.c to annotate.c.
* breakpoint.c, blockframe.c, infrun.c, cp-valprint.c, main.c,
printcmd.c, source.c, stack.c, utils.c, valprint.c:
Use annotate.c functions to output annotations.
* Makefile.in (OBS): Add annotate.o.
alpha-nat.c
alpha-tdep.c
altos-xdep.c
+annotate.c
+annotate.h
arm-convert.s
arm-pinsn.c
arm-tdep.c
+Fri May 13 08:10:21 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ gcc -Wall lint:
+ * breakpoint.c (watchpoint_check): Remove unused variable b.
+ * stack.c (print_frame_info): Move sp and buf inside #if.
+ * eval.c (evaluate_subexp): Remove unused variables pp,
+ mangle_ptr, ptr, and mangle_tstr.
+ * valarith.c (value_x_binop): Remove unused variables mangle_tstr
+ and mangle_ptr.
+ * symtab.c (lookup_symtab): Put variable copy inside #if.
+ (decode_line_1): Put variable q1 inside #if 0.
+ * target.h: Declare target_link.
+ * infrun.c (wait_for_inferior): Remove unused variables signame.
+ * remote.c (remote_resume): Remove unused variable name.
+ * c-exp.y (parse_number): Parenthesize operand of shift.
+ * dbxread.c (record_minimal_symbol): Parenthesize operand of &&
+ (this is a semantic change, the warning seems to have detected a bug).
+ * dbxread.c (end_psymtab): Move variable p1 inside #if.
+ * coffread.c: Move variable temptype inside #if.
+ * ch-typeprint.c (chill_type_print_base): Remove unused variable
+ name.
+ * ch-valprint.c: #include typeprint.h and ch-lang.h.
+ (chill_val_print): Remove unused variable in_range.
+ (chill_val_print): Remove statement "length > TYPE_LENGTH (type);".
+ (chill_val_print): Add default case for switch.
+ * stabsread.h: Declare stabsect_build_psymtabs.
+ * os9kread.c (read_minimal_symbols): Make this return void.
+ (os9k_symfile_read): Remove unused variables stb_exist and val.
+ (os9k_symfile_init): Remove unused variable val.
+ (fill_sym): Remove unused variable id.
+ (read_os9k_psymtab): Put variable back_to inside #if 0. Remove
+ unused variable nsl.
+ Remove unused variable symfile_bfd.
+ #if 0 unused variables lbrac_unmatched_complaint and
+ lbrac_mismatch_complaint.
+ Remove declaration for non-existent function os9k_next_symbol_text.
+
+ * annotate.c, annotate.h: New files, containing a function for
+ each annotation which outputs it.
+ * Move breakpoints_changed from breakpoint.c to annotate.c.
+ * breakpoint.c, blockframe.c, infrun.c, cp-valprint.c, main.c,
+ printcmd.c, source.c, stack.c, utils.c, valprint.c:
+ Use annotate.c functions to output annotations.
+ * Makefile.in (OBS): Add annotate.o.
+
Thu May 12 10:46:27 1994 Jeff Law (law@snake.cs.utah.edu)
* hppa-tdep.c (read_unwind_info): Make sure elf_unwind_size and
# right, it is probably easiest just to list .h files here directly.
HFILES_NO_SRCDIR = buildsym.h call-cmds.h coff-solib.h defs.h dst.h environ.h \
- $(gdbcmd_h) \
- $(gdbcore_h) gdb-stabs.h $(inferior_h) language.h minimon.h monitor.h \
+ $(gdbcmd_h) gdbcore.h \
+ gdb-stabs.h $(inferior_h) language.h minimon.h monitor.h \
objfiles.h parser-defs.h partial-stab.h serial.h signals.h solib.h \
symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \
c-lang.h ch-lang.h m2-lang.h complaints.h ns32k-opcode.h valprint.h \
vx-share/xdr_ptrace.h vx-share/xdr_rdb.h thread.h \
dcache.h remote-utils.h remote-sim.h
-# Header files that already have srcdir in them.
+# Header files that already have srcdir in them, or which are in objdir.
-HFILES_WITH_SRCDIR = $(udiheaders)
+HFILES_WITH_SRCDIR = $(udiheaders) ../bfd/bfd.h
# GDB "info" files, which should be included in their entirety
dwarfread.o mipsread.o stabsread.o core.o c-lang.o ch-lang.o m2-lang.o \
complaints.o typeprint.o c-typeprint.o ch-typeprint.o m2-typeprint.o \
c-valprint.o cp-valprint.o ch-valprint.o m2-valprint.o nlmread.o \
- serial.o mdebugread.o os9kread.o
+ serial.o mdebugread.o os9kread.o annotate.o
TSOBS = inflow.o
xm-vaxbsd.h: xm-vax.h
kdb: $(NTSSTART) $(OBS) $(NTSOBS) $(ADD_DEPS) $(CDEPS)
- rm -f init.c
- $(srcdir)/munch $(MUNCH_DEFINE) $(OBS) $(NTSOBS) > init.c
- $(CC) $(INTERNAL_LDFLAGS) -c init.c $(CLIBS)
ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o $(ADD_FILES) \
-lc $(CLIBS)
lynx-nat.c m3-nat.c \
m68k-pinsn.c m68k-tdep.c \
m88k-nat.c m88k-pinsn.c m88k-tdep.c mips-nat.c mips-pinsn.c \
- mips-tdep.c mipsm3-nat.c news-xdep.c \
+ mips-tdep.c mipsm3-nat.c mipsv4-nat.c news-xdep.c \
nindy-share/Onindy.c nindy-share/nindy.c \
nindy-share/ttyflush.c nindy-tdep.c \
ns32k-pinsn.c ns32km3-nat.c osfsolib.c \
config/m68k/nm-sun2.h \
config/m68k/nm-sun3.h config/m68k/tm-3b1.h config/m68k/tm-altos.h \
config/m68k/tm-apollo68b.h \
- config/m68k/tm-amix.h config/m68k/tm-delta68.h \
+ config/m68k/tm-amix.h \
+ config/m68k/tm-cisco.h config/m68k/tm-delta68.h \
config/m68k/tm-dpx2.h config/m68k/tm-es1800.h \
config/m68k/tm-hp300bsd.h config/m68k/tm-hp300hpux.h \
config/m68k/tm-isi.h config/m68k/tm-m68klynx.h \
config/mips/tm-idt64.h config/mips/tm-idtl64.h \
config/mips/tm-irix3.h config/mips/tm-irix5.h \
config/mips/tm-mips.h config/mips/tm-mips64.h \
- config/mips/tm-mipsm3.h \
+ config/mips/tm-mipsm3.h config/mips/tm-mipsv4.h \
config/mips/xm-irix3.h \
config/mips/xm-irix4.h config/mips/xm-irix5.h \
config/mips/xm-makeva.h config/mips/xm-mips.h \
- config/mips/xm-mipsm3.h \
+ config/mips/xm-mipsm3.h config/mips/xm-mipsv4.h \
config/mips/xm-riscos.h config/mips/xm-news-mips.h \
config/nm-lynx.h config/nm-sysv4.h \
config/none/nm-none.h config/none/tm-none.h config/none/xm-none.h \
config/m68k/3b1.mt config/m68k/altos.mh config/m68k/altos.mt \
config/m68k/amix.mh config/m68k/amix.mt config/m68k/apollo68b.mh \
config/m68k/apollo68b.mt \
- config/m68k/apollo68v.mh config/m68k/delta68.mh \
+ config/m68k/apollo68v.mh \
+ config/m68k/cisco.mt config/m68k/delta68.mh \
config/m68k/delta68.mt config/m68k/dpx2.mh config/m68k/dpx2.mt \
config/m68k/es1800.mt config/m68k/hp300bsd.mh \
config/m68k/hp300bsd.mt config/m68k/hp300hpux.mh \
config/mips/littlemips.mh config/mips/littlemips.mt \
config/mips/mipsel64.mt \
config/mips/mipsm3.mh config/mips/mipsm3.mt \
+ config/mips/mipsv4.mh config/mips/mipsv4.mt \
config/mips/news-mips.mh config/mips/riscos.mh \
config/none/none.mh config/none/none.mt config/ns32k/merlin.mh \
config/ns32k/merlin.mt config/ns32k/ns32km3.mh config/ns32k/ns32km3.mt \
$(expression_h) gdb-stabs.h $(gdbcore_h) $(gdbtypes_h) language.h \
objfiles.h partial-stab.h stabsread.h symfile.h $(symtab_h)
+mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h
+
news-xdep.o: news-xdep.c
Onindy.o: nindy-share/Onindy.c $(wait_h) nindy-share/block_io.h \
--- /dev/null
+/* Annotation routines for GDB.
+ Copyright 1986, 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include "defs.h"
+#include "annotate.h"
+#include "value.h"
+#include "target.h"
+
+void
+breakpoints_changed ()
+{
+ if (annotation_level > 1)
+ {
+ target_terminal_ours ();
+ printf_unfiltered ("\n\032\032breakpoints-invalid\n");
+ }
+}
+
+void
+annotate_breakpoint (num)
+ int num;
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032breakpoint %d\n", num);
+}
+
+void
+annotate_watchpoint (num)
+ int num;
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032watchpoint %d\n", num);
+}
+
+void
+annotate_starting ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032starting\n");
+}
+
+void
+annotate_stopped ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032stopped\n");
+}
+
+void
+annotate_exited (exitstatus)
+ int exitstatus;
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032exited %d\n", exitstatus);
+}
+
+void
+annotate_signalled ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032signalled\n");
+}
+
+void
+annotate_signal_name ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032signal-name\n");
+}
+
+void
+annotate_signal_name_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032signal-name-end\n");
+}
+
+void
+annotate_signal_string ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032signal-string\n");
+}
+
+void
+annotate_signal_string_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032signal-string-end\n");
+}
+
+void
+annotate_signal ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032signal\n");
+}
+\f
+void
+annotate_breakpoints_headers ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032breakpoints-headers\n");
+}
+
+void
+annotate_field (num)
+ int num;
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field %d\n", num);
+}
+
+void
+annotate_breakpoints_table ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032breakpoints-table\n");
+}
+
+void
+annotate_record ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032record\n");
+}
+
+void
+annotate_breakpoints_table_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032breakpoints-table-end\n");
+}
+
+void
+annotate_frames_invalid ()
+{
+ if (annotation_level > 1)
+ {
+ target_terminal_ours ();
+ printf_unfiltered ("\n\032\032frames-invalid\n");
+ }
+}
+
+void
+annotate_field_begin (type)
+ struct type *type;
+{
+ if (annotation_level > 1)
+ {
+ printf_filtered ("\n\032\032field-begin ");
+ print_value_flags (type);
+ printf_filtered ("\n");
+ }
+}
+
+void
+annotate_field_name_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field-name-end\n");
+}
+
+void
+annotate_field_value ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field-value\n");
+}
+
+void
+annotate_field_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field-value\n");
+}
+\f
+void
+annotate_quit ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032quit\n");
+}
+
+void
+annotate_error ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032error\n");
+}
+
+void
+annotate_error_begin ()
+{
+ if (annotation_level > 1)
+ fprintf_filtered (gdb_stderr, "\n\032\032error-begin\n");
+}
+
+void
+annotate_value_history_begin (histindex, type)
+ int histindex;
+ struct type *type;
+{
+ if (annotation_level > 1)
+ {
+ printf_filtered ("\n\032\032value-history-begin %d ", histindex);
+ print_value_flags (type);
+ printf_filtered ("\n");
+ }
+}
+
+void
+annotate_value_begin (type)
+ struct type *type;
+{
+ if (annotation_level > 1)
+ {
+ printf_filtered ("\n\032\032value-begin ");
+ print_value_flags (type);
+ printf_filtered ("\n");
+ }
+}
+
+void
+annotate_value_history_value ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032value-history-value\n");
+}
+
+void
+annotate_value_history_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032value-history-end\n");
+}
+
+void
+annotate_value_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032value-end\n");
+}
+
+void
+annotate_display_begin ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032display-begin\n");
+}
+
+void
+annotate_display_number_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032display-number-end\n");
+}
+
+void
+annotate_display_format ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032display-format\n");
+}
+
+void
+annotate_display_expression ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032display-expression\n");
+}
+
+void
+annotate_display_expression_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032display-expression-end\n");
+}
+
+void
+annotate_display_value ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032display-value\n");
+}
+
+void
+annotate_display_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032display-end\n");
+}
+
+void
+annotate_arg_begin ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032arg-begin\n");
+}
+
+void
+annotate_arg_name_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032arg-name-end\n");
+}
+
+void
+annotate_arg_value (type)
+ struct type *type;
+{
+ if (annotation_level > 1)
+ {
+ printf_filtered ("\n\032\032arg-value ");
+ print_value_flags (type);
+ printf_filtered ("\n");
+ }
+}
+
+void
+annotate_arg_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032arg-end\n");
+}
+
+void
+annotate_source (filename, line, character, mid, pc)
+ char *filename;
+ int line;
+ int character;
+ int mid;
+ CORE_ADDR pc;
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032source ");
+ else
+ printf_filtered ("\032\032");
+
+ printf_filtered ("%s:%d:%d:%s:", filename,
+ line, character,
+ mid ? "middle" : "beg");
+ print_address_numeric (pc, 0, gdb_stdout);
+ printf_filtered ("\n");
+}
+
+void
+annotate_frame_begin (level, pc)
+ int level;
+ CORE_ADDR pc;
+{
+ if (annotation_level > 1)
+ {
+ printf_filtered ("\n\032\032frame-begin %d ", level);
+ print_address_numeric (pc, 0, gdb_stdout);
+ printf_filtered ("\n");
+ }
+}
+
+void
+annotate_function_call ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032function-call\n");
+}
+
+void
+annotate_signal_handler_caller ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032signal-handler-caller\n");
+}
+
+void
+annotate_frame_address ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032frame-address\n");
+}
+
+void
+annotate_frame_address_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032frame-address-end\n");
+}
+
+void
+annotate_frame_function_name ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032frame-function-name\n");
+}
+
+void
+annotate_frame_args ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032frame-args\n");
+}
+
+void
+annotate_frame_source_begin ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032frame-source-begin\n");
+}
+
+void
+annotate_frame_source_file ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032frame-source-file\n");
+}
+
+void
+annotate_frame_source_file_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032frame-source-file-end\n");
+}
+
+void
+annotate_frame_source_line ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032frame-source-line\n");
+}
+
+void
+annotate_frame_source_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032frame-source-end\n");
+}
+
+void
+annotate_frame_where ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032frame-where\n");
+}
+
+void
+annotate_frame_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032frame-end\n");
+}
+\f
+void
+annotate_array_section_begin (index, elttype)
+ int index;
+ struct type *elttype;
+{
+ if (annotation_level > 1)
+ {
+ printf_filtered ("\n\032\032array-section-begin %d ", index);
+ print_value_flags (elttype);
+ printf_filtered ("\n");
+ }
+}
+
+void
+annotate_elt_rep (repcount)
+ unsigned int repcount;
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032elt-rep %u\n", repcount);
+}
+
+void
+annotate_elt_rep_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032elt-rep-end\n");
+}
+
+void
+annotate_elt ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032elt\n");
+}
+
+void
+annotate_array_section_end ()
+{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032array-section-end\n");
+}
+
--- /dev/null
+/* Annotation routines for GDB.
+ Copyright 1986, 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+extern void breakpoints_changed PARAMS ((void));
+
+extern void annotate_breakpoint PARAMS ((int));
+extern void annotate_watchpoint PARAMS ((int));
+extern void annotate_starting PARAMS ((void));
+extern void annotate_stopped PARAMS ((void));
+extern void annotate_exited PARAMS ((int));
+extern void annotate_signalled PARAMS ((void));
+extern void annotate_signal_name PARAMS ((void));
+extern void annotate_signal_name_end PARAMS ((void));
+extern void annotate_signal_string PARAMS ((void));
+extern void annotate_signal_string_end PARAMS ((void));
+extern void annotate_signal PARAMS ((void));
+
+extern void annotate_breakpoints_headers PARAMS ((void));
+extern void annotate_field PARAMS ((int));
+extern void annotate_breakpoints_table PARAMS ((void));
+extern void annotate_record PARAMS ((void));
+extern void annotate_breakpoints_table_end PARAMS ((void));
+
+extern void annotate_frames_invalid PARAMS ((void));
+
+#ifdef __STDC__
+struct type;
+#endif
+
+extern void annotate_field_begin PARAMS ((struct type *));
+extern void annotate_field_name_end PARAMS ((void));
+extern void annotate_field_value PARAMS ((void));
+extern void annotate_field_end PARAMS ((void));
+
+extern void annotate_quit PARAMS ((void));
+extern void annotate_error PARAMS ((void));
+extern void annotate_error_begin PARAMS ((void));
+
+extern void annotate_value_history_begin PARAMS ((int, struct type *));
+extern void annotate_value_begin PARAMS ((struct type *));
+extern void annotate_value_history_value PARAMS ((void));
+extern void annotate_value_history_end PARAMS ((void));
+extern void annotate_value_end PARAMS ((void));
+
+extern void annotate_display_begin PARAMS ((void));
+extern void annotate_display_number_end PARAMS ((void));
+extern void annotate_display_format PARAMS ((void));
+extern void annotate_display_expression PARAMS ((void));
+extern void annotate_display_expression_end PARAMS ((void));
+extern void annotate_display_value PARAMS ((void));
+extern void annotate_display_end PARAMS ((void));
+
+extern void annotate_arg_begin PARAMS ((void));
+extern void annotate_arg_name_end PARAMS ((void));
+extern void annotate_arg_value PARAMS ((struct type *));
+extern void annotate_arg_end PARAMS ((void));
+
+extern void annotate_source PARAMS ((char *, int, int, int, CORE_ADDR));
+
+extern void annotate_frame_begin PARAMS ((int, CORE_ADDR));
+extern void annotate_function_call PARAMS ((void));
+extern void annotate_signal_handler_caller PARAMS ((void));
+extern void annotate_frame_address PARAMS ((void));
+extern void annotate_frame_address_end PARAMS ((void));
+extern void annotate_frame_function_name PARAMS ((void));
+extern void annotate_frame_args PARAMS ((void));
+extern void annotate_frame_source_begin PARAMS ((void));
+extern void annotate_frame_source_file PARAMS ((void));
+extern void annotate_frame_source_file_end PARAMS ((void));
+extern void annotate_frame_source_line PARAMS ((void));
+extern void annotate_frame_source_end PARAMS ((void));
+extern void annotate_frame_where PARAMS ((void));
+extern void annotate_frame_end PARAMS ((void));
+
+extern void annotate_array_section_begin PARAMS ((int, struct type *));
+extern void annotate_elt_rep PARAMS ((unsigned int));
+extern void annotate_elt_rep_end PARAMS ((void));
+extern void annotate_elt PARAMS ((void));
+extern void annotate_array_section_end PARAMS ((void));
#include "language.h"
#include <string.h>
#include "demangle.h"
+#include "annotate.h"
/* local function prototypes */
CORE_ADDR default_breakpoint_address;
struct symtab *default_breakpoint_symtab;
int default_breakpoint_line;
-
-/* Flag indicating extra verbosity for xgdb. */
-extern int xgdb_verbose;
-
-static void
-breakpoints_changed ()
-{
- if (annotation_level > 1)
- {
- target_terminal_ours ();
- printf_unfiltered ("\n\032\032breakpoints-invalid\n");
- }
-}
\f
/* *PP is a string denoting a breakpoint. Get the number of the breakpoint.
Advance *PP after the string and any trailing whitespace.
{
/* I think the user probably only wants to see one breakpoint
number, not all of them. */
+ annotate_breakpoint (bs->breakpoint_at->number);
printf_filtered ("\nBreakpoint %d, ", bs->breakpoint_at->number);
return 0;
}
-
+
if (bs->old_val != NULL)
{
+ annotate_watchpoint (bs->breakpoint_at->number);
printf_filtered ("\nWatchpoint %d, ", bs->breakpoint_at->number);
print_expression (bs->breakpoint_at->exp, gdb_stdout);
printf_filtered ("\nOld value = ");
char *p;
{
bpstat bs = (bpstat) p;
- struct breakpoint *b;
FRAME saved_frame, fr;
int within_current_scope, saved_level;
if (!found_a_breakpoint++)
{
- if (annotation_level > 1)
- printf_filtered ("\n\032\032breakpoints-headers\n");
-
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 0\n");
+ annotate_field (0);
printf_filtered ("Num ");
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 1\n");
+ annotate_field (1);
printf_filtered ("Type ");
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 2\n");
+ annotate_field (2);
printf_filtered ("Disp ");
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 3\n");
+ annotate_field (3);
printf_filtered ("Enb ");
if (addressprint)
{
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 4\n");
+ annotate_field (4);
printf_filtered ("Address ");
}
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 5\n");
+ annotate_field (5);
printf_filtered ("What\n");
- if (annotation_level > 1)
- printf_filtered ("\n\032\032breakpoints-table\n");
+ annotate_breakpoints_table ();
}
- if (annotation_level > 1)
- printf_filtered ("\n\032\032record\n\n\032\032field 0\n");
+ annotate_record ();
+ annotate_field (0);
printf_filtered ("%-3d ", b->number);
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 1\n");
+ annotate_field (1);
printf_filtered ("%-14s ", bptypes[(int)b->type]);
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 2\n");
+ annotate_field (2);
printf_filtered ("%-4s ", bpdisps[(int)b->disposition]);
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 3\n");
+ annotate_field (3);
printf_filtered ("%-3c ", bpenables[(int)b->enable]);
strcpy (wrap_indent, " ");
/* Field 4, the address, is omitted (which makes the columns
not line up too nicely with the headers, but the effect
is relatively readable). */
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 5\n");
+ annotate_field (5);
print_expression (b->exp, gdb_stdout);
break;
case bp_call_dummy:
if (addressprint)
{
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 4\n");
+ annotate_field (4);
/* FIXME-32x64: need a print_address_numeric with
field width */
printf_filtered
((unsigned long) b->address, "08l"));
}
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 5\n");
+ annotate_field (5);
last_addr = b->address;
if (b->source_file)
if (b->frame)
{
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 6\n");
+ annotate_field (6);
printf_filtered ("\tstop only in stack frame at ");
print_address_numeric (b->frame, 1, gdb_stdout);
if (b->cond)
{
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 7\n");
+ annotate_field (7);
printf_filtered ("\tstop only if ");
print_expression (b->cond, gdb_stdout);
if (b->ignore_count)
{
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 8\n");
+ annotate_field (8);
printf_filtered ("\tignore next %d hits\n", b->ignore_count);
}
if ((l = b->commands))
{
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field 9\n");
+ annotate_field (9);
while (l)
{
if (last_addr != (CORE_ADDR)-1)
set_next_address (last_addr);
- if (annotation_level > 1)
- printf_filtered ("\n\032\032breakpoints-table-end\n");
+ annotate_breakpoints_table_end ();
}
/* ARGSUSED */
<< 16);
if (high_bit == 0)
/* A long long does not fit in a LONGEST. */
- high_bit = (unsigned LONGEST)1 << sizeof (LONGEST) * HOST_CHAR_BIT - 1;
+ high_bit =
+ (unsigned LONGEST)1 << (sizeof (LONGEST) * HOST_CHAR_BIT - 1);
unsigned_type = builtin_type_unsigned_long_long;
signed_type = builtin_type_long_long;
}
int show;
int level;
{
- char *name;
register int len;
register int i;
struct type *index_type;
#include "language.h"
#include "demangle.h"
#include "c-lang.h" /* For c_val_print */
+#include "typeprint.h"
+#include "ch-lang.h"
static void
chill_print_value_fields PARAMS ((struct type *, char *, GDB_FILE *, int, int,
int i;
int is_bitstring = TYPE_CODE (type) == TYPE_CODE_BITSTRING;
int need_comma = 0;
- int in_range = 0;
if (is_bitstring)
fputs_filtered ("B'", stream);
fprintf_filtered (stream,
"<dynamic length %d > static length %d>",
length, TYPE_LENGTH (type));
- length > TYPE_LENGTH (type);
}
LA_PRINT_STRING (stream, data_addr, length, 0);
return length;
+ default:
+ break;
}
}
chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
struct type *in_function_type;
#endif
-struct pending_block *pending_blocks;
-
/* Complaints about various problems in the file being read */
struct complaint ef_complaint =
break;
/* fall in for static symbols that don't start with '.' */
case C_EXT:
- /* Record external symbols in minsyms if we don't have debug
- info for them. FIXME, this is probably the wrong thing
- to do. Why don't we record them even if we do have
- debug symbol info? What really belongs in the minsyms
- anyway? Fred!?? */
- if (!SDB_TYPE (cs->c_type)) {
- /* FIXME: This is BOGUS Will Robinson!
- Coff should provide the SEC_CODE flag for executable sections,
- then if we could look up sections by section number we
- could see if the flags indicate SEC_CODE. If so, then
- record this symbol as a function in the minimal symbol table.
- But why are absolute syms recorded as functions, anyway? */
- if (cs->c_secnum <= text_bfd_scnum+1) {/* text or abs */
- record_minimal_symbol (cs->c_name, cs->c_value,
- mst_text, objfile);
- break;
- } else {
- record_minimal_symbol (cs->c_name, cs->c_value,
- mst_data, objfile);
- break;
- }
- }
- process_coff_symbol (cs, &main_aux, objfile);
+ /* Record it in the minimal symbols regardless of SDB_TYPE.
+ This parallels what we do for other debug formats, and
+ probably is needed to make print_address_symbolic work right
+ without the "set fast-symbolic-addr off" kludge. */
+
+ /* FIXME: This bogusly assumes the sections are in a certain
+ order, text (SEC_CODE) sections are before data sections,
+ etc. */
+ if (cs->c_secnum <= text_bfd_scnum+1)
+ {
+ /* text or absolute. (FIXME, should use mst_abs if
+ absolute). */
+ record_minimal_symbol
+ (cs->c_name, cs->c_value,
+ cs->c_sclass == C_STAT ? mst_file_text : mst_text,
+ objfile);
+ }
+ else
+ {
+ record_minimal_symbol
+ (cs->c_name, cs->c_value,
+ cs->c_sclass == C_STAT ? mst_file_data : mst_data,
+ objfile);
+ }
+ if (SDB_TYPE (cs->c_type))
+ process_coff_symbol (cs, &main_aux, objfile);
break;
case C_FCN:
= (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
sizeof (struct symbol));
char *name;
- struct type *temptype;
memset (sym, 0, sizeof (struct symbol));
name = cs->c_name;
#endif
add_symbol_to_list (sym, &local_symbols);
#if !defined (BELIEVE_PCC_PROMOTION) && (TARGET_BYTE_ORDER == BIG_ENDIAN)
- /* If PCC says a parameter is a short or a char,
- aligned on an int boundary, realign it to the "little end"
- of the int. */
- temptype = lookup_fundamental_type (current_objfile, FT_INTEGER);
- if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (temptype)
- && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT
- && 0 == SYMBOL_VALUE (sym) % TYPE_LENGTH (temptype))
+ {
+ /* If PCC says a parameter is a short or a char,
+ aligned on an int boundary, realign it to the "little end"
+ of the int. */
+ struct type *temptype;
+ temptype = lookup_fundamental_type (current_objfile, FT_INTEGER);
+ if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (temptype)
+ && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT
+ && 0 == SYMBOL_VALUE (sym) % TYPE_LENGTH (temptype))
{
- SYMBOL_VALUE (sym) += TYPE_LENGTH (temptype)
- - TYPE_LENGTH (SYMBOL_TYPE (sym));
+ SYMBOL_VALUE (sym) +=
+ TYPE_LENGTH (temptype)
+ - TYPE_LENGTH (SYMBOL_TYPE (sym));
}
#endif
break;
#if !defined (BELIEVE_PCC_PROMOTION)
/* FIXME: This should retain the current type, since it's just
a register value. gnu@adobe, 26Feb93 */
- /* If PCC says a parameter is a short or a char,
- it is really an int. */
- temptype = lookup_fundamental_type (current_objfile, FT_INTEGER);
- if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (temptype)
- && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT)
- {
- SYMBOL_TYPE (sym) = TYPE_UNSIGNED (SYMBOL_TYPE (sym))
- ? lookup_fundamental_type (current_objfile,
- FT_UNSIGNED_INTEGER)
- : temptype;
- }
+ {
+ /* If PCC says a parameter is a short or a char,
+ it is really an int. */
+ struct type *temptype;
+ temptype =
+ lookup_fundamental_type (current_objfile, FT_INTEGER);
+ if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (temptype)
+ && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT)
+ {
+ SYMBOL_TYPE (sym) =
+ (TYPE_UNSIGNED (SYMBOL_TYPE (sym))
+ ? lookup_fundamental_type (current_objfile,
+ FT_UNSIGNED_INTEGER)
+ : temptype);
+ }
#endif
break;
/* If type has no name, give it one */
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
- TYPE_NAME (SYMBOL_TYPE (sym)) = concat (SYMBOL_NAME (sym), NULL);
+ {
+ if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR
+ || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_FUNC)
+ {
+ /* If we are giving a name to a type such as "pointer to
+ foo" or "function returning foo", we better not set
+ the TYPE_NAME. If the program contains "typedef char
+ *caddr_t;", we don't want all variables of type char
+ * to print as caddr_t. This is not just a
+ consequence of GDB's type management; CC and GCC (at
+ least through version 2.4) both output variables of
+ either type char * or caddr_t with the type
+ refering to the C_TPDEF symbol for caddr_t. If a future
+ compiler cleans this up it GDB is not ready for it
+ yet, but if it becomes ready we somehow need to
+ disable this check (without breaking the PCC/GCC2.4
+ case).
+
+ Sigh.
+
+ Fortunately, this check seems not to be necessary
+ for anything except pointers or functions. */
+ ;
+ }
+ else
+ TYPE_NAME (SYMBOL_TYPE (sym)) =
+ concat (SYMBOL_NAME (sym), NULL);
+ }
/* Keep track of any type which points to empty structured type,
so it can be filled from a definition from another file. A
break;
}
-#if 0
- /* This screws up perfectly good C programs with enums. FIXME. */
- /* Is this Modula-2's BOOLEAN type? Flag it as such if so. */
- if(TYPE_NFIELDS(type) == 2 &&
- ((STREQ(TYPE_FIELD_NAME(type,0),"TRUE") &&
- STREQ(TYPE_FIELD_NAME(type,1),"FALSE")) ||
- (STREQ(TYPE_FIELD_NAME(type,1),"TRUE") &&
- STREQ(TYPE_FIELD_NAME(type,0),"FALSE"))))
- TYPE_CODE(type) = TYPE_CODE_BOOL;
-#endif
return type;
}
#include "command.h"
#include "gdbcmd.h"
#include "demangle.h"
+#include "annotate.h"
int vtblprint; /* Controls printing of vtbl's */
int objectprint; /* Controls looking up an object's derived type
}
else
{
- if (annotation_level > 1)
- {
- printf_filtered ("\n\032\032field-begin ");
- print_value_flags (TYPE_FIELD_TYPE (type, i));
- printf_filtered ("\n");
- }
+ annotate_field_begin (TYPE_FIELD_TYPE (type, i));
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
language_cplus,
DMGL_PARAMS | DMGL_ANSI);
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field-name-end\n");
+ annotate_field_name_end ();
fputs_filtered (" = ", stream);
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field-value\n");
+ annotate_field_value ();
}
if (TYPE_FIELD_PACKED (type, i))
0, stream, format, 0, recurse + 1, pretty);
}
}
- if (annotation_level > 1)
- printf_filtered ("\n\032\032field-end\n");
+ annotate_field_end ();
}
if (pretty)
#include "gdbcmd.h"
#include "target.h"
#include "thread.h"
+#include "annotate.h"
#include <signal.h>
else if (!signal_program[stop_signal])
stop_signal = TARGET_SIGNAL_0;
+ annotate_starting ();
+
/* Resume inferior. */
resume (oneproc || step || bpstat_should_step (), stop_signal);
while (1)
{
+ pid = target_wait (-1, &w);
+
/* Clean up saved state that will become invalid. */
flush_cached_frames ();
registers_changed ();
- pid = target_wait (-1, &w);
-
switch (w.kind)
{
case TARGET_WAITKIND_LOADED:
case TARGET_WAITKIND_EXITED:
target_terminal_ours (); /* Must do this before mourn anyway */
+ annotate_exited (w.value.integer);
if (w.value.integer)
printf_filtered ("\nProgram exited with code 0%o.\n",
(unsigned int)w.value.integer);
stop_print_frame = 0;
stop_signal = w.value.sig;
target_terminal_ours (); /* Must do this before mourn anyway */
+ annotate_signalled ();
target_kill (); /* kill mourns as well */
- printf_filtered ("\nProgram terminated with signal %s, %s.\n",
- target_signal_to_name (stop_signal),
- target_signal_to_string (stop_signal));
+ printf_filtered ("\nProgram terminated with signal ");
+ annotate_signal_name ();
+ printf_filtered ("%s", target_signal_to_name (stop_signal));
+ annotate_signal_name_end ();
+ printf_filtered (", ");
+ annotate_signal_string ();
+ printf_filtered ("%s", target_signal_to_string (stop_signal));
+ annotate_signal_string_end ();
+ printf_filtered (".\n");
printf_filtered ("The program no longer exists.\n");
gdb_flush (gdb_stdout);
{
if (signal_print[stop_signal])
{
- char *signame;
-
printed = 1;
target_terminal_ours_for_output ();
printf_filtered ("\nProgram received signal %s, %s.\n",
{
remove_breakpoints ();
resume (1, 0);
+
+ /* FIXME: This is bogus. You can't interact with the
+ inferior except when it is stopped. It apparently
+ happens to work on Irix4, but it depends on /proc
+ allowing us to muck with the memory of a running process,
+ and the kernel deciding to run one instruction of the
+ inferior before it executes our insert_breakpoints code,
+ which seems like an awfully dubious assumption. */
insert_breakpoints ();
+
continue;
}
#endif
if (signal_print[stop_signal])
{
- char *signame;
printed = 1;
target_terminal_ours_for_output ();
- printf_filtered ("\nProgram received signal %s, %s.\n",
- target_signal_to_name (stop_signal),
- target_signal_to_string (stop_signal));
+ annotate_signal ();
+ printf_filtered ("\nProgram received signal ");
+ annotate_signal_name ();
+ printf_filtered ("%s", target_signal_to_name (stop_signal));
+ annotate_signal_name_end ();
+ printf_filtered (", ");
+ annotate_signal_string ();
+ printf_filtered ("%s", target_signal_to_string (stop_signal));
+ annotate_signal_string_end ();
+ printf_filtered (".\n");
gdb_flush (gdb_stdout);
}
if (signal_stop[stop_signal])
disable_current_display ();
if (step_multi && stop_step)
- return;
+ goto done;
target_terminal_ours ();
}
if (!target_has_stack)
- return;
+ goto done;
/* Select innermost stack frame except on return from a stack dummy routine,
or if the program has exited. Print it without a level number if
stop_pc = read_pc();
select_frame (get_current_frame (), 0);
}
+ done:
+ annotate_stopped ();
}
static int
#include "expression.h"
#include "language.h"
#include "terminal.h" /* For job_control. */
+#include "annotate.h"
#include "getopt.h"
switch (reason)
{
case RETURN_QUIT:
- printf_unfiltered ("\n\032\032quit\n");
+ annotate_quit ();
break;
case RETURN_ERROR:
- printf_unfiltered ("\n\032\032error\n");
+ annotate_error ();
break;
}
extern int previous_stab_code;
-/* The BFD for this file -- implicit parameter to next_symbol_text. */
-static bfd *symfile_bfd;
-
/* Name of last function encountered. Used in Solaris to approximate
object file boundaries. */
static char *last_function_name;
extern struct complaint repeated_header_name_complaint;
+#if 0
static struct complaint lbrac_unmatched_complaint =
{"unmatched Increment Block Entry before symtab pos %d", 0, 0};
static struct complaint lbrac_mismatch_complaint =
{"IBE/IDE symbol mismatch at symtab pos %d", 0, 0};
-
+#endif
\f
/* Local function prototypes */
static void
static void
init_psymbol_list PARAMS ((struct objfile *));
-static char *
-os9k_next_symbol_text PARAMS ((void));
-
static int
fill_sym PARAMS ((FILE *, bfd *));
};
#define STBSYMSIZE 10
-static int
+static void
read_minimal_symbols(objfile, section_offsets)
struct objfile *objfile;
struct section_offsets *section_offsets;
off += STBSYMSIZE;
};
install_minimal_symbols (objfile);
- return 1;
+ return;
}
\f
/* Scan and build partial symbols for a symbol file.
int mainline; /* FIXME comments above */
{
bfd *sym_bfd;
- int val;
- int stb_exist;
struct cleanup *back_to;
sym_bfd = objfile->obfd;
os9k_symfile_init (objfile)
struct objfile *objfile;
{
- int val;
bfd *sym_bfd = objfile->obfd;
char *name = bfd_get_filename (sym_bfd);
char dbgname[512], stbname[512];
FILE *dbg_file;
bfd *abfd;
{
-short id;
short si, nmask;
long li;
int ii;
{
register struct internal_symstruct *bufp = 0; /* =0 avoids gcc -Wall glitch*/
register char *namestring;
- int nsl;
int past_first_source_file = 0;
CORE_ADDR last_o_file_start = 0;
+#if 0
struct cleanup *back_to;
+#endif
bfd *abfd;
FILE *fp;
#include "breakpoint.h"
#include "demangle.h"
#include "valprint.h"
+#include "annotate.h"
extern int asm_demangle; /* Whether to demangle syms in asm printouts */
extern int addressprint; /* Whether to print hex addresses in HLL " */
{
int histindex = record_latest_value (val);
- if (annotation_level > 1)
- {
- if (histindex >= 0)
- printf_filtered ("\n\032\032value-history-begin %d ", histindex);
- else
- printf_filtered ("\n\032\032value-begin ");
- print_value_flags (VALUE_TYPE (val));
- printf_filtered ("\n");
- }
+ if (histindex >= 0)
+ annotate_value_history_begin (histindex, VALUE_TYPE (val));
+ else
+ annotate_value_begin (VALUE_TYPE (val));
if (inspect)
printf_unfiltered ("\031(gdb-makebuffer \"%s\" %d '(\"", exp, histindex);
else
if (histindex >= 0) printf_filtered ("$%d = ", histindex);
- if (annotation_level > 1 && histindex >= 0)
- printf_filtered ("\n\032\032value-history-value\n");
+ if (histindex >= 0)
+ annotate_value_history_value ();
print_formatted (val, format, fmt.size);
printf_filtered ("\n");
- if (annotation_level > 1)
- {
- if (histindex >= 0)
- printf_filtered ("\n\032\032value-history-end\n");
- else
- printf_filtered ("\n\032\032value-end\n");
- }
+ if (histindex >= 0)
+ annotate_value_history_end ();
+ else
+ annotate_value_end ();
if (inspect)
printf_unfiltered("\") )\030");
val = evaluate_expression (expr);
- if (annotation_level > 1)
- {
- printf_filtered ("\n\032\032value-begin ");
- print_value_flags (VALUE_TYPE (val));
- printf_filtered ("\n");
- }
+ annotate_value_begin (VALUE_TYPE (val));
print_formatted (val, format, fmt.size);
- if (annotation_level > 1)
- printf_filtered ("\n\032\032value-end\n");
+ annotate_value_end ();
do_cleanups (old_chain);
}
current_display_number = d->number;
- printf_filtered ("%d: ", d->number);
+ annotate_display_begin ();
+ printf_filtered ("%d", d->number);
+ annotate_display_number_end ();
+ printf_filtered (": ");
if (d->format.size)
{
CORE_ADDR addr;
-
+
+ annotate_display_format ();
+
printf_filtered ("x/");
if (d->format.count != 1)
printf_filtered ("%d", d->format.count);
if (d->format.format != 'i' && d->format.format != 's')
printf_filtered ("%c", d->format.size);
printf_filtered (" ");
+
+ annotate_display_expression ();
+
print_expression (d->exp, gdb_stdout);
+ annotate_display_expression_end ();
+
if (d->format.count != 1)
printf_filtered ("\n");
else
addr = value_as_pointer (evaluate_expression (d->exp));
if (d->format.format == 'i')
addr = ADDR_BITS_REMOVE (addr);
-
+
+ annotate_display_value ();
+
do_examine (d->format, addr);
}
else
{
+ annotate_display_format ();
+
if (d->format.format)
printf_filtered ("/%c ", d->format.format);
+
+ annotate_display_expression ();
+
print_expression (d->exp, gdb_stdout);
+ annotate_display_expression_end ();
+
printf_filtered (" = ");
+
+ annotate_display_expression ();
+
print_formatted (evaluate_expression (d->exp),
d->format.format, d->format.size);
printf_filtered ("\n");
}
+ annotate_display_end ();
+
gdb_flush (gdb_stdout);
current_display_number = -1;
}
fprintf_filtered (stream, ", ");
wrap_here (" ");
- if (annotation_level > 1)
- printf_filtered ("\n\032\032arg-begin\n");
+ annotate_arg_begin ();
fprintf_symbol_filtered (stream, SYMBOL_SOURCE_NAME (sym),
SYMBOL_LANGUAGE (sym), DMGL_PARAMS | DMGL_ANSI);
- if (annotation_level > 1)
- printf_filtered ("\n\032\032arg-name-end\n");
+ annotate_arg_name_end ();
fputs_filtered ("=", stream);
/* Avoid value_print because it will deref ref parameters. We just
2 for each recurse. */
val = read_var_value (sym, FRAME_INFO_ID (fi));
- if (annotation_level > 1)
- {
- printf_filtered ("\n\032\032arg-value ");
- print_value_flags (val == NULL ? NULL : VALUE_TYPE (val));
- printf_filtered ("\n");
- }
+ annotate_arg_value (val == NULL ? NULL : VALUE_TYPE (val));
if (val)
val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), VALUE_ADDRESS (val),
else
fputs_filtered ("???", stream);
- if (annotation_level > 1)
- printf_filtered ("\n\032\032arg-end\n");
+ annotate_arg_end ();
first = 0;
}
static void
get_offsets ()
{
- unsigned char buf [PBUFSIZ];
+ unsigned char buf[PBUFSIZ];
int nvals;
CORE_ADDR text_addr, data_addr, bss_addr;
struct section_offsets *offs;
putpkt ("qOffsets");
- getpkt (buf, 1);
+ getpkt (buf, 0);
+ if (buf[0] == '\000')
+ return; /* Return silently. Stub doesn't support this
+ command. */
if (buf[0] == 'E')
{
warning ("Remote failure reply: %s", buf);
if (siggnal)
{
- char *name;
target_terminal_ours_for_output ();
printf_filtered
("Can't send signals to a remote system. %s not sent.\n",
#include "regex.h"
#include "symfile.h"
#include "objfiles.h"
+#include "annotate.h"
#ifndef DIRNAME_SEPARATOR
#define DIRNAME_SEPARATOR ':'
if (line > s->nlines)
/* Don't index off the end of the line_charpos array. */
return 0;
- /* FIXME-32x64: Need a version of print_address_numeric which does
- not pass use_local to print_longest. */
- printf_unfiltered ("\032\032%s:%d:%d:%s:0x%lx\n", s->fullname,
- line, s->line_charpos[line - 1],
- mid_statement ? "middle" : "beg",
- (unsigned long) pc);
+ annotate_source (s->fullname, line, s->line_charpos[line - 1],
+ mid_statement, pc);
+
current_source_line = line;
first_line_listed = line;
last_line_listed = line;
sym = find_pc_function (sal.pc);
if (sym)
{
- print_address_numeric (sal.pc, gdb_stdout);
+ print_address_numeric (sal.pc, 1, gdb_stdout);
printf_filtered (" is in ");
fputs_filtered (SYMBOL_SOURCE_NAME (sym), gdb_stdout);
printf_filtered (" (%s:%d).\n", sal.symtab->filename, sal.line);
}
else
{
- print_address_numeric (sal.pc, gdb_stdout);
+ print_address_numeric (sal.pc, 1, gdb_stdout);
printf_filtered (" is at %s:%d.\n",
sal.symtab->filename, sal.line);
}
/* If this is the only line, show the source code. If it could
not find the file, don't do anything special. */
- if (frame_file_full_name && sals.nelts == 1)
+ if (annotation_level && sals.nelts == 1)
identify_source_line (sal.symtab, sal.line, 0, start_pc);
}
else
file_ptr stabstroffset,
unsigned int stabstrsize));
+extern void stabsect_build_psymtabs
+ PARAMS ((struct objfile *objfile,
+ struct section_offsets *section_offsets,
+ int mainline,
+ char *stab_name,
+ char *stabstr_name));
+
extern void elfstab_offset_sections PARAMS ((struct objfile *,
struct partial_symtab *));
cplusplus_hint (name)
char *name;
{
- printf_unfiltered ("Hint: try '%s<TAB> or '%s<ESC-?>\n", name, name);
- printf_unfiltered ("(Note leading single quote.)\n");
+ printf_filtered ("Hint: try '%s<TAB> or '%s<ESC-?>\n", name, name);
+ printf_filtered ("(Note leading single quote.)\n");
}
/* Check for a symtab of a specific name; first in symtabs, then in
char *name;
{
register struct symtab *s;
+#if 0
register char *copy;
+#endif
s = lookup_symtab_1 (name);
if (s) return s;
struct symtab_and_line val;
#endif
register char *p, *p1;
- char *q, *q1, *pp;
+ char *q, *pp;
+#if 0
+ char *q1;
+#endif
register struct symtab *s;
register struct symbol *sym;
if (opname == NULL)
{
error_begin ();
- printf_unfiltered ("no mangling for \"%s\"\n", tmp);
+ printf_filtered ("no mangling for \"%s\"\n", tmp);
cplusplus_hint (saved_arg);
return_to_top_level (RETURN_ERROR);
}
tmp = copy;
error_begin ();
if (tmp[0] == '~')
- printf_unfiltered
+ printf_filtered
("the class `%s' does not have destructor defined\n",
SYMBOL_SOURCE_NAME(sym_class));
else
- printf_unfiltered
+ printf_filtered
("the class %s does not have any method named %s\n",
SYMBOL_SOURCE_NAME(sym_class), tmp);
cplusplus_hint (saved_arg);
{
error_begin ();
/* The quotes are important if copy is empty. */
- printf_unfiltered
+ printf_filtered
("can't find class, struct, or union named \"%s\"\n", copy);
cplusplus_hint (saved_arg);
return_to_top_level (RETURN_ERROR);
/* Used some places (e.g. stop_signal) to record the concept that
there is no signal. */
TARGET_SIGNAL_0 = 0,
+ TARGET_SIGNAL_FIRST = 0,
TARGET_SIGNAL_HUP = 1,
TARGET_SIGNAL_INT = 2,
TARGET_SIGNAL_QUIT = 3,
#define target_has_execution \
(current_target->to_has_execution)
+extern void target_link PARAMS ((char *, CORE_ADDR *));
+
/* Converts a process id to a string. Usually, the string just contains
`process xyz', but on some systems it may contain
`process xyz thread abc'. */
CORE_ADDR addr; /* Lowest address in section */
CORE_ADDR endaddr; /* 1+highest address in section */
- /* For the ptx compiler, we can't use the sec_ptr typedef when the field's
- name is sec_ptr. We really should rename the field (or better yet,
- the typedef should be bfd_sec_ptr). */
- struct sec *sec_ptr; /* BFD section pointer */
+ sec_ptr the_bfd_section;
bfd *bfd; /* BFD file pointer */
};
#include "demangle.h"
#include "expression.h"
#include "language.h"
+#include "annotate.h"
#include "readline.h"
wrap_here (""); /* Force out any buffered output */
gdb_flush (gdb_stdout);
- if (annotation_level > 1)
- fprintf_filtered (gdb_stderr, "\n\032\032error-begin\n");
+ annotate_error_begin ();
if (error_pre_print)
fprintf_filtered (gdb_stderr, error_pre_print);
SERIAL_FLUSH_OUTPUT (gdb_stdout_serial);
SERIAL_UN_FDOPEN (gdb_stdout_serial);
- if (annotation_level > 1)
- fprintf_filtered (gdb_stderr, "\n\032\032error-begin\n");
+ annotate_error_begin ();
/* Don't use *_filtered; we don't want to prompt the user to continue. */
if (error_pre_print)
#include "obstack.h"
#include "language.h"
#include "demangle.h"
+#include "annotate.h"
#include <errno.h>
printf() that supports "ll" in the format string. We handle these by seeing
if the number is actually a long, and if not we just bail out and print the
number in hex. The format chars b,h,w,g are from
- print_scalar_formatted(). USE_LOCAL says whether or not to call the
- local formatting routine to get the format. */
+ print_scalar_formatted(). If USE_LOCAL, format it according to the current
+ language (this should be used for most integers which GDB prints, the
+ exception is things like protocols where the format of the integer is
+ a protocol thing, not a user-visible thing). */
void
print_longest (stream, format, use_local, val_long)
elttype = TYPE_TARGET_TYPE (type);
eltlen = TYPE_LENGTH (elttype);
len = TYPE_LENGTH (type) / eltlen;
-
+
+ annotate_array_section_begin (i, elttype);
+
for (; i < len && things_printed < print_max; i++)
{
if (i != 0)
}
}
wrap_here (n_spaces (2 + 2 * recurse));
-
+
rep1 = i + 1;
reps = 1;
while ((rep1 < len) &&
++rep1;
}
- if (annotation_level > 1)
- {
- printf_filtered ("\n\032\032array-element-begin %d ", i);
- print_value_flags (elttype);
- printf_filtered ("\n");
- }
-
if (reps > repeat_count_threshold)
{
val_print (elttype, valaddr + i * eltlen, 0, stream, format,
deref_ref, recurse + 1, pretty);
+ annotate_elt_rep (reps);
fprintf_filtered (stream, " <repeats %u times>", reps);
+ annotate_elt_rep_end ();
+
i = rep1 - 1;
things_printed += repeat_count_threshold;
}
{
val_print (elttype, valaddr + i * eltlen, 0, stream, format,
deref_ref, recurse + 1, pretty);
+ annotate_elt ();
things_printed++;
}
- if (annotation_level > 1)
- printf_filtered ("\n\032\032array-element-end\n");
}
+ annotate_array_section_end ();
if (i < len)
{
fprintf_filtered (stream, "...");
if (errcode == EIO)
{
fprintf_filtered (stream, " <Address ");
- print_address_numeric (addr, stream);
+ print_address_numeric (addr, 1, stream);
fprintf_filtered (stream, " out of bounds>");
}
else
{
fprintf_filtered (stream, " <Error reading address ");
- print_address_numeric (addr, stream);
+ print_address_numeric (addr, 1, stream);
fprintf_filtered (stream, ": %s>", safe_strerror (errcode));
}
}