Skip to content

Commit

Permalink
PDP-11 Co Pro - show halted state in debugger regs command
Browse files Browse the repository at this point in the history
Change-Id: I044d1c7c06612dbca7656163b0016508e8cfd802
  • Loading branch information
hoglet67 committed Jan 11, 2022
1 parent 1edb6ee commit c9f4f55
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pdp11/pdp11_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ enum register_numbers {
i_PS,
i_PREVUSER,
i_CURUSER,
i_INTQUEUE
i_INTQUEUE,
i_HALTED
};

// NULL pointer terminated list of register names.
Expand All @@ -46,6 +47,7 @@ static const char *dbg_reg_names[] = {
"PREVUSER",
"CURRUSER",
"INTQUEUE",
"HALTED",
NULL
};

Expand Down Expand Up @@ -153,6 +155,8 @@ static size_t dbg_reg_print(int which, char *buf, size_t bufsize) {
sprintf(buf + i * 5, "%02x:%d ", m_pdp11->itab[i].vec, m_pdp11->itab[i].pri);
}
return strlen(buf);
} else if (which == i_HALTED) {
return (size_t)snprintf(buf, bufsize, "%d", m_pdp11->halted);
} else {
return (size_t)snprintf(buf, bufsize, "%06"PRIo32" (%04"PRIx32")", dbg_reg_get(which), dbg_reg_get(which));
}
Expand Down

0 comments on commit c9f4f55

Please sign in to comment.