On 03/16/2018 05:34 PM, Peter Maydell wrote:
On 16 March 2018 at 16:23, KONRAD Frederic <frederic.kon...@adacore.com> wrote:
Since the commit:
commit 4486e89c219c0d1b9bd8dfa0b1dd5b0d51ff2268
Author: Stefan Hajnoczi <stefa...@redhat.com>
Date: Wed Mar 7 14:42:05 2018 +0000
vl: introduce vm_shutdown()
GDB crash when qemu exits (at least on sparc-softmmu):
Remote communication error. Target disconnected.: Connection reset by peer.
Quitting: putpkt: write failed: Broken pipe.
So send a packet to kill GDB before we exit QEMU:
[Inferior 1 (Thread 0) exited normally]
Signed-off-by: KONRAD Frederic <frederic.kon...@adacore.com>
---
gdbstub.c | 7 +++++++
include/exec/gdbstub.h | 2 ++
vl.c | 2 ++
3 files changed, 11 insertions(+)
We didn't send an exiting packet before commit 4486e89c219c0,
so do you know why this worked before then? (Telling gdb we're
exiting seems like the right thing, though.)
Hmmm good question, I didn't had time to investigate in detail
Before 4486e89c219c0:
(gdb) tar rem :1234
Remote debugging using :1234
0x40000000 in trap_table ()
(gdb) c
Continuing.
Remote connection closed
After 4486e89c219c0:
(gdb) tar rem :1234
Remote debugging using :1234
0x40000000 in trap_table ()
(gdb) c
Continuing.
putpkt: write failed: Connection reset by peer.
With the patch:
(gdb) tar rem :1234
Remote debugging using :1234
0x40000000 in trap_table ()
(gdb) c
Continuing.
[Inferior 1 (Thread 0) exited normally]
We use to have this patch in our repository to avoid the remote
connection closed above.
Thanks,
Fred
thanks
-- PMM