gdb_main: Always release CPU when detaching.

Fixes Issue #413 and released as PR #477.
This commit is contained in:
Uwe Bonnes 2019-05-22 17:48:02 +02:00 committed by UweBonnes
parent 24a7b8b2bf
commit 703f88a969
1 changed files with 3 additions and 1 deletions

View File

@ -227,8 +227,10 @@ int gdb_main_loop(struct target_controller *tc, bool in_syscall)
case 0x04:
case 'D': /* GDB 'detach' command. */
if(cur_target)
if(cur_target) {
SET_RUN_STATE(1);
target_detach(cur_target);
}
last_target = cur_target;
cur_target = NULL;
gdb_putpacketz("OK");