DebugTest.test_interrupt passes now.

This commit is contained in:
Tim Newsome 2016-06-10 13:25:55 -07:00
parent e10d407623
commit c8430bb8f4
1 changed files with 3 additions and 1 deletions

View File

@ -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;