blob: 71cbe6c5f23efa7f6fa8b9ef95962340e663e4bb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
debug: 0.980
x86: 0.965
graphic: 0.945
architecture: 0.913
mistranslation: 0.873
semantic: 0.841
performance: 0.837
device: 0.784
user-level: 0.775
i386: 0.695
ppc: 0.680
files: 0.666
PID: 0.647
virtual: 0.641
register: 0.600
hypervisor: 0.577
kernel: 0.576
permissions: 0.551
network: 0.543
vnc: 0.516
TCG: 0.513
VMM: 0.508
risc-v: 0.489
KVM: 0.473
socket: 0.465
peripherals: 0.462
arm: 0.448
boot: 0.392
assembly: 0.377
[gdbstub] qemu is killed when using remote debugger with qemu -S -s
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://git.qemu.org/?p=qemu.git;a=commitdiff;h=00e94dbc7fd0110b0555d59592b004333adfb4b8
[2] http://git.qemu.org/?p=qemu.git;a=commitdiff;h=ce0274f730eacbd24c706523ddbbabb6b95d0659
[3] http://git.qemu.org/?p=qemu.git;a=commitdiff;h=7d03f82f81e0e6c106ca0d2445a0fc49dc9ddc7b
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.
|