DebugTest.test_interrupt passes now.
parent
e10d407623
commit
c8430bb8f4
|
@ -962,7 +962,6 @@ static int riscv_examine(struct target *target)
|
|||
|
||||
static int handle_halt(struct target *target)
|
||||
{
|
||||
target_call_event_callbacks(target, TARGET_EVENT_HALTED);
|
||||
target->state = TARGET_HALTED;
|
||||
|
||||
uint32_t dpc;
|
||||
|
@ -975,6 +974,7 @@ static int handle_halt(struct target *target)
|
|||
return ERROR_FAIL;
|
||||
}
|
||||
int cause = get_field(dcsr, DCSR_CAUSE);
|
||||
LOG_DEBUG("halt cause is %d; dcsr=0x%x", cause, dcsr);
|
||||
switch (cause) {
|
||||
case DCSR_CAUSE_SWBP:
|
||||
case DCSR_CAUSE_HWBP:
|
||||
|
@ -992,6 +992,8 @@ static int handle_halt(struct target *target)
|
|||
cause, dcsr);
|
||||
}
|
||||
|
||||
target_call_event_callbacks(target, TARGET_EVENT_HALTED);
|
||||
|
||||
LOG_DEBUG("halted at 0x%x", dpc);
|
||||
|
||||
return ERROR_OK;
|
||||
|
|
Loading…
Reference in New Issue