argument, rather than an address and section. All callers changed.
+2001-05-05 Jim Blandy <jimb@redhat.com>
+
+ * breakpoint.c (check_duplicates): Take a breakpoint object as an
+ argument, rather than an address and section. All callers changed.
+
2001-05-03 Kevin Buettner <kevinb@redhat.com>
* defs.h (ptid_t): New typedef.
2001-05-03 Kevin Buettner <kevinb@redhat.com>
* defs.h (ptid_t): New typedef.
struct breakpoint *set_raw_breakpoint (struct symtab_and_line);
struct breakpoint *set_raw_breakpoint (struct symtab_and_line);
-static void check_duplicates (CORE_ADDR, asection *);
+static void check_duplicates (struct breakpoint *);
static void describe_other_breakpoints (CORE_ADDR, asection *);
static void describe_other_breakpoints (CORE_ADDR, asection *);
default_breakpoint_line = line;
}
default_breakpoint_line = line;
}
-/* Rescan breakpoints at address ADDRESS,
+/* Rescan breakpoints at the same address and section as BPT,
marking the first one as "first" and any others as "duplicates".
This is so that the bpt instruction is only inserted once.
marking the first one as "first" and any others as "duplicates".
This is so that the bpt instruction is only inserted once.
- If we have a permanent breakpoint at ADDRESS, make that one
- the official one, and the rest as duplicates. */
+ If we have a permanent breakpoint at the same place as BPT, make
+ that one the official one, and the rest as duplicates. */
-check_duplicates (CORE_ADDR address, asection *section)
+check_duplicates (struct breakpoint *bpt)
{
register struct breakpoint *b;
register int count = 0;
struct breakpoint *perm_bp = 0;
{
register struct breakpoint *b;
register int count = 0;
struct breakpoint *perm_bp = 0;
+ CORE_ADDR address = bpt->address;
+ asection *section = bpt->section;
if (address == 0) /* Watchpoints are uninteresting */
return;
if (address == 0) /* Watchpoints are uninteresting */
return;
- check_duplicates (sal.pc, sal.section);
breakpoints_changed ();
return b;
breakpoints_changed ();
return b;
if (b->type == bp_longjmp)
{
b->enable = enabled;
if (b->type == bp_longjmp)
{
b->enable = enabled;
- check_duplicates (b->address, b->section);
|| b->type == bp_longjmp_resume)
{
b->enable = disabled;
|| b->type == bp_longjmp_resume)
{
b->enable = disabled;
- check_duplicates (b->address, b->section);
b->frame = frame->frame;
else
b->frame = 0;
b->frame = frame->frame;
else
b->frame = 0;
- check_duplicates (b->address, b->section);
&& (b->enable == enabled))
{
b->enable = call_disabled;
&& (b->enable == enabled))
{
b->enable = call_disabled;
- check_duplicates (b->address, b->section);
&& (b->enable == call_disabled))
{
b->enable = enabled;
&& (b->enable == call_disabled))
{
b->enable = enabled;
- check_duplicates (b->address, b->section);
- check_duplicates (bpt->address, bpt->section);
+ check_duplicates (bpt);
/* If this breakpoint was inserted, and there is another breakpoint
at the same address, we need to insert the other breakpoint. */
if (bpt->inserted
/* If this breakpoint was inserted, and there is another breakpoint
at the same address, we need to insert the other breakpoint. */
if (bpt->inserted
/* Now that this is re-enabled, check_duplicates
can be used. */
/* Now that this is re-enabled, check_duplicates
can be used. */
- check_duplicates (b->address, b->section);
- check_duplicates (bpt->address, bpt->section);
+ check_duplicates (bpt);
if (modify_breakpoint_hook)
modify_breakpoint_hook (bpt);
if (modify_breakpoint_hook)
modify_breakpoint_hook (bpt);
if (bpt->enable != permanent)
bpt->enable = enabled;
bpt->disposition = disposition;
if (bpt->enable != permanent)
bpt->enable = enabled;
bpt->disposition = disposition;
- check_duplicates (bpt->address, bpt->section);
+ check_duplicates (bpt);
breakpoints_changed ();
if (bpt->type == bp_watchpoint ||
breakpoints_changed ();
if (bpt->type == bp_watchpoint ||