diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-05-13 18:18:57 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-05-13 18:18:57 +0000 |
commit | 1c95d7ab2e12e00756d21ef44c7539f8f9edc56f (patch) | |
tree | 1366d0687b8ad6294d7cbb151227f81b4f3280da /gdb/breakpoint.c | |
parent | f3e72e3771ea66fb319fe96b96403ef212dbfb50 (diff) | |
download | gdb-1c95d7ab2e12e00756d21ef44c7539f8f9edc56f.zip gdb-1c95d7ab2e12e00756d21ef44c7539f8f9edc56f.tar.gz gdb-1c95d7ab2e12e00756d21ef44c7539f8f9edc56f.tar.bz2 |
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.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 80 |
1 files changed, 24 insertions, 56 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 3e43ca3..a697560 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -35,6 +35,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "language.h" #include <string.h> #include "demangle.h" +#include "annotate.h" /* local function prototypes */ @@ -193,19 +194,6 @@ int default_breakpoint_valid; 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"); - } -} /* *PP is a string denoting a breakpoint. Get the number of the breakpoint. Advance *PP after the string and any trailing whitespace. @@ -945,12 +933,14 @@ print_it_normal (bs) { /* 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 = "); @@ -1044,7 +1034,6 @@ watchpoint_check (p) char *p; { bpstat bs = (bpstat) p; - struct breakpoint *b; FRAME saved_frame, fr; int within_current_scope, saved_level; @@ -1540,46 +1529,33 @@ breakpoint_1 (bnum, allflag) 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, " "); @@ -1592,8 +1568,7 @@ breakpoint_1 (bnum, allflag) /* 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; @@ -1608,8 +1583,7 @@ breakpoint_1 (bnum, allflag) 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 @@ -1618,8 +1592,7 @@ breakpoint_1 (bnum, allflag) ((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) @@ -1644,8 +1617,7 @@ breakpoint_1 (bnum, allflag) 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); @@ -1654,8 +1626,7 @@ breakpoint_1 (bnum, allflag) 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); @@ -1664,16 +1635,14 @@ breakpoint_1 (bnum, allflag) 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) { @@ -1698,8 +1667,7 @@ breakpoint_1 (bnum, allflag) 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 */ |