diff options
author | Jason Molenda <jmolenda@apple.com> | 1998-10-14 01:15:00 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1998-10-14 01:15:00 +0000 |
commit | ad3b8c4a1a37dc966ddbcc687dcf78ec1f80022f (patch) | |
tree | 74fceadbf33b9e1a46c14a699ee7271f2f9963ac /gdb/breakpoint.c | |
parent | 9a3d6f4eefb862c4302973e6b5bde4820cb70580 (diff) | |
download | gdb-ad3b8c4a1a37dc966ddbcc687dcf78ec1f80022f.zip gdb-ad3b8c4a1a37dc966ddbcc687dcf78ec1f80022f.tar.gz gdb-ad3b8c4a1a37dc966ddbcc687dcf78ec1f80022f.tar.bz2 |
1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)
* blockframe.c (find_pc_sect_partial_function): Add braces to avoid
possible nested-if confusion.
* breakpoint.c (breakpoint_here_p): Ditto.
(breakpoint_inserted_here_p): Ditto.
(breakpoint_thread_match): Ditto.
* gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined.
* gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability
prototypes.
* symtab.h: Add prototype for _initialize_source.
* value.h: Add prototype for _initialize_value.
* defs.h: Include sys/types.h or stddef.h to get size_t.
(make_cleanup): Add make_cleanup_func typedef and switch to using
a prototype for this function.
(mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't
using mmalloc.
* ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c dwarf2read.c
dwarfread.c elfread.c eval.c exec.c gdbtk-cmds.c gdbtk.c infcmd.c
infrun.c mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c
symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c valops.c:
Cast parameters passed to make_cleanup to use the new
make_cleanup_func typedef.
More warning cleanups. There are still a bunch of places where the first
argument to make_cleanup is not cast to (make_cleanup_func); these are
either due to the function fitting the make_cleanup_func specification
already (e.g. free()) or they are in files that weren't compiled when
I did my make on a Linux native system. Bwahahaha. You can see them
like this:
grep make_cleanup\ * | grep -v make_cleanup_func
I'll surely go back and clean up the remaining suspicious calls in
GDB one of these days. :-)
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 71799fa..6706bdd 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -850,12 +850,14 @@ breakpoint_here_p (pc) ALL_BREAKPOINTS (b) if (b->enable == enabled && b->address == pc) /* bp is enabled and matches pc */ - if (overlay_debugging && - section_is_overlay (b->section) && - !section_is_mapped (b->section)) - continue; /* unmapped overlay -- can't be a match */ - else - return 1; + { + if (overlay_debugging && + section_is_overlay (b->section) && + !section_is_mapped (b->section)) + continue; /* unmapped overlay -- can't be a match */ + else + return 1; + } return 0; } @@ -872,12 +874,14 @@ breakpoint_inserted_here_p (pc) ALL_BREAKPOINTS (b) if (b->inserted && b->address == pc) /* bp is inserted and matches pc */ - if (overlay_debugging && - section_is_overlay (b->section) && - !section_is_mapped (b->section)) - continue; /* unmapped overlay -- can't be a match */ - else - return 1; + { + if (overlay_debugging && + section_is_overlay (b->section) && + !section_is_mapped (b->section)) + continue; /* unmapped overlay -- can't be a match */ + else + return 1; + } return 0; } @@ -935,12 +939,14 @@ breakpoint_thread_match (pc, pid) && b->enable != shlib_disabled && b->address == pc && (b->thread == -1 || b->thread == thread)) - if (overlay_debugging && - section_is_overlay (b->section) && - !section_is_mapped (b->section)) - continue; /* unmapped overlay -- can't be a match */ - else - return 1; + { + if (overlay_debugging && + section_is_overlay (b->section) && + !section_is_mapped (b->section)) + continue; /* unmapped overlay -- can't be a match */ + else + return 1; + } return 0; } @@ -2937,7 +2943,7 @@ until_break_command (arg, from_tty) breakpoint = set_momentary_breakpoint (sal, selected_frame, bp_until); - old_chain = make_cleanup(delete_breakpoint, breakpoint); + old_chain = make_cleanup ((make_cleanup_func) delete_breakpoint, breakpoint); /* Keep within the current frame */ @@ -2946,7 +2952,7 @@ until_break_command (arg, from_tty) sal = find_pc_line (prev_frame->pc, 0); sal.pc = prev_frame->pc; breakpoint = set_momentary_breakpoint (sal, prev_frame, bp_until); - make_cleanup(delete_breakpoint, breakpoint); + make_cleanup ((make_cleanup_func) delete_breakpoint, breakpoint); } proceed (-1, TARGET_SIGNAL_DEFAULT, 0); @@ -3929,6 +3935,8 @@ is valid is not currently in scope.\n", bpt->number); int i = hw_watchpoint_used_count (bpt->type, &other_type_used); int mem_cnt = can_use_hardware_watchpoint (bpt->val); + /* Hack around 'unused var' error for some targets here */ + (void) mem_cnt, i; target_resources_ok = TARGET_CAN_USE_HARDWARE_WATCHPOINT( bpt->type, i + mem_cnt, other_type_used); /* we can consider of type is bp_hardware_watchpoint, convert to |