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 *);
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.
- 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. */
static void
-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;
+ CORE_ADDR address = bpt->address;
+ asection *section = bpt->section;
if (address == 0) /* Watchpoints are uninteresting */
return;
b1->next = b;
}
- check_duplicates (sal.pc, sal.section);
+ check_duplicates (b);
breakpoints_changed ();
return b;
if (b->type == bp_longjmp)
{
b->enable = enabled;
- check_duplicates (b->address, b->section);
+ check_duplicates (b);
}
}
|| b->type == bp_longjmp_resume)
{
b->enable = disabled;
- check_duplicates (b->address, b->section);
+ check_duplicates (b);
}
}
b->frame = frame->frame;
else
b->frame = 0;
- check_duplicates (b->address, b->section);
+ check_duplicates (b);
return;
}
}
&& (b->enable == enabled))
{
b->enable = call_disabled;
- check_duplicates (b->address, b->section);
+ check_duplicates (b);
}
}
}
&& (b->enable == call_disabled))
{
b->enable = enabled;
- check_duplicates (b->address, b->section);
+ check_duplicates (b);
}
}
}
}
}
- 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
/* Now that this is re-enabled, check_duplicates
can be used. */
- check_duplicates (b->address, b->section);
+ check_duplicates (b);
}
xfree (sals.sals);
bpt->enable = disabled;
- check_duplicates (bpt->address, bpt->section);
+ check_duplicates (bpt);
if (modify_breakpoint_hook)
modify_breakpoint_hook (bpt);
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 ||