show wait state in debugger
This commit is contained in:
parent
3f5f1d91d1
commit
5df0b6f70f
2 changed files with 8 additions and 2 deletions
4
cpu.h
4
cpu.h
|
@ -126,8 +126,6 @@ public:
|
|||
uint64_t get_wait_time() const { return wait_time; }
|
||||
std::tuple<double, double, uint64_t, uint32_t, double> get_mips_rel_speed(const std::optional<uint64_t> & instruction_count, const std::optional<uint64_t> & t_diff_1s) const;
|
||||
|
||||
std::map<uint8_t, std::set<uint8_t> > get_queued_interrupts() const { return queued_interrupts; }
|
||||
|
||||
bool get_debug() const { return debug_mode; }
|
||||
void set_debug(const bool d) { debug_mode = d; stacktrace.clear(); }
|
||||
std::vector<std::pair<uint16_t, std::string> > get_stack_trace() const;
|
||||
|
@ -141,6 +139,8 @@ public:
|
|||
|
||||
void init_interrupt_queue();
|
||||
void queue_interrupt(const uint8_t level, const uint8_t vector);
|
||||
std::map<uint8_t, std::set<uint8_t> > get_queued_interrupts() const { return queued_interrupts; }
|
||||
std::optional<int> get_interrupt_delay_left() const { return trap_delay; }
|
||||
|
||||
void trap(uint16_t vector, const int new_ipl = -1, const bool is_interrupt = false);
|
||||
bool is_it_a_trap() const { return it_is_a_trap; }
|
||||
|
|
|
@ -720,6 +720,12 @@ void show_queued_interrupts(console *const cnsl, cpu *const c)
|
|||
{
|
||||
cnsl->put_string_lf(format("Current level: %d", c->getPSW_spl()));
|
||||
|
||||
auto delay = c->get_interrupt_delay_left();
|
||||
if (delay.has_value())
|
||||
cnsl->put_string_lf(format("Current delay left: %d", delay.value()));
|
||||
else
|
||||
cnsl->put_string_lf("No delay");
|
||||
|
||||
auto queued_interrupts = c->get_queued_interrupts();
|
||||
|
||||
for(auto & level: queued_interrupts) {
|
||||
|
|
Loading…
Add table
Reference in a new issue