SDS: Allow specifying breakpoints as being in monitor, user or normal mode only
Breakpoint logic now allows four execution-type breakpoints: -E as before, break if PC equals address, unqualified by mode -M break if PC equals address and machine is in monitor mode -N break if PC equals address and machine is in normal (SDS 930) mode -U break if PC equals address and machine is in user mode
This commit is contained in:
parent
614fe87af4
commit
396e78cb26
3 changed files with 35 additions and 6 deletions
|
@ -428,9 +428,31 @@ while (reason == 0) { /* loop until halted */
|
|||
int_reqhi = api_findreq (); /* recalc int req */
|
||||
}
|
||||
else { /* normal instr */
|
||||
if (sim_brk_summ && sim_brk_test (P, SWMASK ('E'))) { /* breakpoint? */
|
||||
if (sim_brk_summ) {
|
||||
uint32 btyp = SWMASK ('E');
|
||||
|
||||
if (nml_mode)
|
||||
btyp = SWMASK ('E') | SWMASK ('N');
|
||||
else
|
||||
btyp = usr_mode ? SWMASK ('E') | SWMASK ('U')
|
||||
: SWMASK ('E') | SWMASK ('M');
|
||||
btyp = sim_brk_test (P, btyp);
|
||||
if (btyp) {
|
||||
if (btyp & SWMASK ('E')) /* unqualified breakpoint? */
|
||||
reason = STOP_IBKPT; /* stop simulation */
|
||||
else switch (btyp) { /* qualified breakpoint */
|
||||
case SWMASK ('M'): /* monitor mode */
|
||||
reason = STOP_MBKPT; /* stop simulation */
|
||||
break;
|
||||
case SWMASK ('N'): /* normal (SDS 930) mode */
|
||||
reason = STOP_NBKPT; /* stop simulation */
|
||||
break;
|
||||
case SWMASK ('U'): /* user mode */
|
||||
reason = STOP_UBKPT; /* stop simulation */
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
reason = Read (save_P = P, &inst); /* get instr */
|
||||
P = (P + 1) & VA_MASK; /* incr PC */
|
||||
|
@ -1473,7 +1495,8 @@ pcq_r = find_reg ("PCQ", NULL, dptr);
|
|||
if (pcq_r)
|
||||
pcq_r->qptr = 0;
|
||||
else return SCPE_IERR;
|
||||
sim_brk_types = sim_brk_dflt = SWMASK ('E');
|
||||
sim_brk_dflt = SWMASK ('E');
|
||||
sim_brk_types = SWMASK ('E') | SWMASK ('M') | SWMASK ('N') | SWMASK ('U');
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,9 @@
|
|||
#define STOP_RTCINS 12 /* rtc inst not MIN/SKR */
|
||||
#define STOP_ILLVEC 13 /* zero vector */
|
||||
#define STOP_CCT 14 /* runaway CCT */
|
||||
#define STOP_MBKPT 15 /* monitor-mode breakpoint */
|
||||
#define STOP_NBKPT 16 /* normal-mode breakpoint */
|
||||
#define STOP_UBKPT 17 /* user-mode breakpoint */
|
||||
|
||||
/* Trap codes */
|
||||
|
||||
|
|
|
@ -96,7 +96,10 @@ const char *sim_stop_messages[] = {
|
|||
"Trap instruction not BRM",
|
||||
"RTC instruction not MIN or SKR",
|
||||
"Interrupt vector zero",
|
||||
"Runaway carriage control tape"
|
||||
"Runaway carriage control tape",
|
||||
"Monitor-mode Breakpoint",
|
||||
"Normal-mode Breakpoint",
|
||||
"User-mode Breakpoint"
|
||||
};
|
||||
|
||||
/* Character conversion tables */
|
||||
|
|
Loading…
Add table
Reference in a new issue