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