aarch64: Enable resuming with address

Enable resuming to an address.

Change-Id: I29c7d3b56f6cbf8b3cd02c93733fc96f45000af3
Signed-off-by: David Ung <david.ung.42@gmail.com>
Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com>
This commit is contained in:
David Ung 2015-04-23 14:49:01 -07:00 committed by Matthias Welwarsky
parent 13d13b2e2a
commit a12c15e21f
1 changed files with 5 additions and 9 deletions

View File

@ -1023,12 +1023,7 @@ static int aarch64_resume(struct target *target, int current,
target_addr_t address, int handle_breakpoints, int debug_execution) target_addr_t address, int handle_breakpoints, int debug_execution)
{ {
int retval = 0; int retval = 0;
uint64_t resume_addr; uint64_t addr = address;
if (address) {
LOG_DEBUG("resuming with custom address not supported");
return ERROR_FAIL;
}
/* dummy resume for smp toggle in order to reduce gdb impact */ /* dummy resume for smp toggle in order to reduce gdb impact */
if ((target->smp) && (target->gdb_service->core[1] != -1)) { if ((target->smp) && (target->gdb_service->core[1] != -1)) {
@ -1039,7 +1034,8 @@ static int aarch64_resume(struct target *target, int current,
target_call_event_callbacks(target, TARGET_EVENT_RESUMED); target_call_event_callbacks(target, TARGET_EVENT_RESUMED);
return 0; return 0;
} }
aarch64_internal_restore(target, current, &resume_addr, handle_breakpoints, debug_execution); aarch64_internal_restore(target, current, &addr, handle_breakpoints,
debug_execution);
if (target->smp) { if (target->smp) {
target->gdb_service->core[0] = -1; target->gdb_service->core[0] = -1;
retval = aarch64_restore_smp(target, handle_breakpoints); retval = aarch64_restore_smp(target, handle_breakpoints);
@ -1051,11 +1047,11 @@ static int aarch64_resume(struct target *target, int current,
if (!debug_execution) { if (!debug_execution) {
target->state = TARGET_RUNNING; target->state = TARGET_RUNNING;
target_call_event_callbacks(target, TARGET_EVENT_RESUMED); target_call_event_callbacks(target, TARGET_EVENT_RESUMED);
LOG_DEBUG("target resumed at 0x%" PRIx64, resume_addr); LOG_DEBUG("target resumed at 0x%" PRIu64, addr);
} else { } else {
target->state = TARGET_DEBUG_RUNNING; target->state = TARGET_DEBUG_RUNNING;
target_call_event_callbacks(target, TARGET_EVENT_DEBUG_RESUMED); target_call_event_callbacks(target, TARGET_EVENT_DEBUG_RESUMED);
LOG_DEBUG("target debug resumed at 0x%" PRIx64, resume_addr); LOG_DEBUG("target debug resumed at 0x%" PRIu64, addr);
} }
return ERROR_OK; return ERROR_OK;