diff options
author | Stan Shebs <shebs@codesourcery.com> | 1998-11-21 20:16:49 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 1998-11-21 20:16:49 +0000 |
commit | 92fb1f2eba523458199331c4b17a7e6104e454ed (patch) | |
tree | f556d3ebb4439345a851e882d1f3e67f766dc070 /gdb | |
parent | aa8938d5813431eeea6112a2d20f41cbc6f002f3 (diff) | |
download | gdb-92fb1f2eba523458199331c4b17a7e6104e454ed.zip gdb-92fb1f2eba523458199331c4b17a7e6104e454ed.tar.gz gdb-92fb1f2eba523458199331c4b17a7e6104e454ed.tar.bz2 |
Sat Nov 21 17:15:40 1998 Philippe De Muyter <phdm@macqel.be>
* breakpoint.c (bpstat_stop_status): Do not increment hit_count
of breakpoint if condition is not true.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/breakpoint.c | 154 |
2 files changed, 61 insertions, 96 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0b9c618..1a8c0a0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ Sat Nov 21 17:15:40 1998 Philippe De Muyter <phdm@macqel.be> + * breakpoint.c (bpstat_stop_status): Do not increment hit_count + of breakpoint if condition is not true. + * coffread.c (coff_symtab_read): Discard C_LABEL's that are not function entry points, to avoid getting them in the stack dump instead of the actual function. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 6706bdd..f6d860c 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -39,147 +39,106 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "symfile.h" #include "objfiles.h" -/* local function prototypes */ +/* Prototypes for local functions. */ -static void -catch_command_1 PARAMS ((char *, int, int)); +static void catch_command_1 PARAMS ((char *, int, int)); -static void -enable_delete_command PARAMS ((char *, int)); +static void enable_delete_command PARAMS ((char *, int)); -static void -enable_delete_breakpoint PARAMS ((struct breakpoint *)); +static void enable_delete_breakpoint PARAMS ((struct breakpoint *)); -static void -enable_once_command PARAMS ((char *, int)); +static void enable_once_command PARAMS ((char *, int)); -static void -enable_once_breakpoint PARAMS ((struct breakpoint *)); +static void enable_once_breakpoint PARAMS ((struct breakpoint *)); -static void -disable_command PARAMS ((char *, int)); +static void disable_command PARAMS ((char *, int)); -static void -enable_command PARAMS ((char *, int)); +static void enable_command PARAMS ((char *, int)); -static void -map_breakpoint_numbers PARAMS ((char *, void (*)(struct breakpoint *))); - -static void -ignore_command PARAMS ((char *, int)); +static void map_breakpoint_numbers PARAMS ((char *, + void (*)(struct breakpoint *))); -static int -breakpoint_re_set_one PARAMS ((char *)); - -void -delete_command PARAMS ((char *, int)); +static void ignore_command PARAMS ((char *, int)); -static void -clear_command PARAMS ((char *, int)); +static int breakpoint_re_set_one PARAMS ((char *)); -static void -catch_command PARAMS ((char *, int)); +static void clear_command PARAMS ((char *, int)); -static struct symtabs_and_lines -get_catch_sals PARAMS ((int)); +static void catch_command PARAMS ((char *, int)); -static void -watch_command PARAMS ((char *, int)); +static struct symtabs_and_lines get_catch_sals PARAMS ((int)); -static int -can_use_hardware_watchpoint PARAMS ((struct value *)); +static void watch_command PARAMS ((char *, int)); -static void -tbreak_command PARAMS ((char *, int)); +static int can_use_hardware_watchpoint PARAMS ((struct value *)); -static void -break_command_1 PARAMS ((char *, int, int)); +static void tbreak_command PARAMS ((char *, int)); -static void -mention PARAMS ((struct breakpoint *)); +static void break_command_1 PARAMS ((char *, int, int)); -struct breakpoint * -set_raw_breakpoint PARAMS ((struct symtab_and_line)); +static void mention PARAMS ((struct breakpoint *)); -static void -check_duplicates PARAMS ((CORE_ADDR, asection *)); +struct breakpoint *set_raw_breakpoint PARAMS ((struct symtab_and_line)); -static void -describe_other_breakpoints PARAMS ((CORE_ADDR, asection *)); +static void check_duplicates PARAMS ((CORE_ADDR, asection *)); -static void -breakpoints_info PARAMS ((char *, int)); +static void describe_other_breakpoints PARAMS ((CORE_ADDR, asection *)); -static void -breakpoint_1 PARAMS ((int, int)); +static void breakpoints_info PARAMS ((char *, int)); -static bpstat -bpstat_alloc PARAMS ((struct breakpoint *, bpstat)); +static void breakpoint_1 PARAMS ((int, int)); -static int -breakpoint_cond_eval PARAMS ((char *)); +static bpstat bpstat_alloc PARAMS ((struct breakpoint *, bpstat)); -static void -cleanup_executing_breakpoints PARAMS ((PTR)); +static int breakpoint_cond_eval PARAMS ((char *)); -static void -commands_command PARAMS ((char *, int)); +static void cleanup_executing_breakpoints PARAMS ((PTR)); -static void -condition_command PARAMS ((char *, int)); +static void commands_command PARAMS ((char *, int)); -static int -get_number PARAMS ((char **)); +static void condition_command PARAMS ((char *, int)); -void -set_breakpoint_count PARAMS ((int)); +static int get_number PARAMS ((char **)); -static int -remove_breakpoint PARAMS ((struct breakpoint *)); +static int remove_breakpoint PARAMS ((struct breakpoint *)); -static int -print_it_normal PARAMS ((bpstat)); +static int print_it_normal PARAMS ((bpstat)); -static int -watchpoint_check PARAMS ((char *)); +static int watchpoint_check PARAMS ((char *)); -static int -print_it_done PARAMS ((bpstat)); +static int print_it_done PARAMS ((bpstat)); -static int -print_it_noop PARAMS ((bpstat)); +static int print_it_noop PARAMS ((bpstat)); -static void -maintenance_info_breakpoints PARAMS ((char *, int)); +static void maintenance_info_breakpoints PARAMS ((char *, int)); #ifdef GET_LONGJMP_TARGET -static void -create_longjmp_breakpoint PARAMS ((char *)); +static void create_longjmp_breakpoint PARAMS ((char *)); #endif -static int -hw_breakpoint_used_count PARAMS ((void)); +static int hw_breakpoint_used_count PARAMS ((void)); -static int -hw_watchpoint_used_count PARAMS ((enum bptype, int *)); +static int hw_watchpoint_used_count PARAMS ((enum bptype, int *)); -static void -hbreak_command PARAMS ((char *, int)); +static void hbreak_command PARAMS ((char *, int)); -static void -thbreak_command PARAMS ((char *, int)); +static void thbreak_command PARAMS ((char *, int)); -static void -watch_command_1 PARAMS ((char *, int, int)); +static void watch_command_1 PARAMS ((char *, int, int)); -static void -rwatch_command PARAMS ((char *, int)); +static void rwatch_command PARAMS ((char *, int)); -static void -awatch_command PARAMS ((char *, int)); +static void awatch_command PARAMS ((char *, int)); -static void -do_enable_breakpoint PARAMS ((struct breakpoint *, enum bpdisp)); +static void do_enable_breakpoint PARAMS ((struct breakpoint *, enum bpdisp)); + +/* Prototypes for exported functions. */ + +void delete_command PARAMS ((char *, int)); + +void _initialize_breakpoint PARAMS ((void)); + +void set_breakpoint_count PARAMS ((int)); extern int addressprint; /* Print machine addresses? */ @@ -1447,7 +1406,8 @@ bpstat_stop_status (pc, not_a_breakpoint) /* Don't stop. */ bs->print_it = print_it_noop; bs->stop = 0; - --(b->hit_count); /* don't consider this a hit */ + /* Don't consider this a hit. */ + --(b->hit_count); continue; default: /* Can't happen. */ @@ -1536,6 +1496,8 @@ bpstat_stop_status (pc, not_a_breakpoint) if (b->cond && value_is_zero) { bs->stop = 0; + /* Don't consider this a hit. */ + --(b->hit_count); } else if (b->ignore_count > 0) { |