[gdbstub] qemu is killed when using remote debugger with qemu -S -s
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hello,
REPRODUCE
$ qemu-system-x86_64 -s -S -nographic
<wait>
QEMU: Terminated via GDBStub
$ gdb
(gdb) target remote :1234
(gdb) load /bin/ls
(gdb) target exec
A program is being debugged already. Kill it? (y or no) y
No executable file now.
EXPECTED
Enable program to be executed without terminating QEMU.
DISCUSSION
This was already discussed in [1], reverted in [2], however, no solution is provided.
It worked perfectly in the past, I guess because of [1] and before [3].
Opening bug for this as discussion in mailing list did not attract anyone and functionality is required. If there is other gdb sequence to achieve same result it would be great to get it documented.
Thanks,
[1] http://
[2] http://
[3] http://
The sequence of gdb commands here is a bit odd since it's switching the gdb session from targeting a remote gdb stub to targeting a local executable. However, if you want to do this without killing QEMU you can:
(gdb) target remote :1234
(gdb) detach
(gdb) target exec /bin/ls
The 'detach' tells gdb to disconnect from the remote gdbstub without killing the QEMU session.