SCP: Fix breakpoint test when multiple breakpoint types are specified
This commit is contained in:
parent
41ba04e88a
commit
b73afbb9d3
1 changed files with 6 additions and 5 deletions
11
scp.c
11
scp.c
|
@ -9014,12 +9014,13 @@ else sim_brk_ins = p + 1; /* after last sch */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
BRKTAB *sim_brk_fnd_ex (t_addr loc, uint32 btyp, t_bool any_typ)
|
BRKTAB *sim_brk_fnd_ex (t_addr loc, uint32 btyp, t_bool any_typ, uint32 spc)
|
||||||
{
|
{
|
||||||
BRKTAB *bp = sim_brk_fnd (loc);
|
BRKTAB *bp = sim_brk_fnd (loc);
|
||||||
|
|
||||||
while (bp) {
|
while (bp) {
|
||||||
if (any_typ ? (bp->typ & btyp) : (bp->typ == btyp))
|
if (any_typ ? ((bp->typ & btyp) && (bp->time_fired[spc] != sim_gtime())) :
|
||||||
|
(bp->typ == btyp))
|
||||||
return bp;
|
return bp;
|
||||||
bp = bp->next;
|
bp = bp->next;
|
||||||
}
|
}
|
||||||
|
@ -9175,7 +9176,7 @@ return SCPE_OK;
|
||||||
|
|
||||||
t_stat sim_brk_show (FILE *st, t_addr loc, int32 sw)
|
t_stat sim_brk_show (FILE *st, t_addr loc, int32 sw)
|
||||||
{
|
{
|
||||||
BRKTAB *bp = sim_brk_fnd_ex (loc, sw & (~SWMASK ('C')), FALSE);
|
BRKTAB *bp = sim_brk_fnd_ex (loc, sw & (~SWMASK ('C')), FALSE, 0);
|
||||||
DEVICE *dptr;
|
DEVICE *dptr;
|
||||||
int32 i, any;
|
int32 i, any;
|
||||||
|
|
||||||
|
@ -9292,8 +9293,8 @@ uint32 spc = (btyp >> SIM_BKPT_V_SPC) & (SIM_BKPT_N_SPC - 1);
|
||||||
if (sim_brk_summ & BRK_TYP_DYN_ALL)
|
if (sim_brk_summ & BRK_TYP_DYN_ALL)
|
||||||
btyp |= BRK_TYP_DYN_ALL;
|
btyp |= BRK_TYP_DYN_ALL;
|
||||||
|
|
||||||
if ((bp = sim_brk_fnd_ex (loc, btyp, TRUE))) { /* in table, and type match? */
|
if ((bp = sim_brk_fnd_ex (loc, btyp, TRUE, spc))) { /* in table, and type match? */
|
||||||
if (bp->time_fired[spc] == sim_gtime()) /* already taken? */
|
if (bp->time_fired[spc] == sim_time) /* already taken? */
|
||||||
return 0;
|
return 0;
|
||||||
bp->time_fired[spc] = sim_time; /* remember match time */
|
bp->time_fired[spc] = sim_time; /* remember match time */
|
||||||
if (--bp->cnt > 0) /* count > 0? */
|
if (--bp->cnt > 0) /* count > 0? */
|
||||||
|
|
Loading…
Add table
Reference in a new issue