From: kaf24@firebug.cl.cam.ac.uk Date: Wed, 19 Apr 2006 21:19:41 +0000 (+0100) Subject: The Xen Hypervisor currently operates a bit differently when the X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16117^2~70 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=202f5a0b35013c000c99b282e75fc7e80f427227;p=xen.git The Xen Hypervisor currently operates a bit differently when the guest is being debugged. The differences are handling of int3 exception and missed pit timer injections. The Xen hypervisor should get back to the normal mode when the gdb connection is closed. With the attached patch gdbserver properly detaches from the guest when the gdb detaches or quits. Signed-Off-By: Nitin A Kamble --- diff --git a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/server.c b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/server.c index 3e1f50ea49..492aab47c0 100644 --- a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/server.c +++ b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/server.c @@ -664,17 +664,13 @@ main (int argc, char *argv[]) For the traditional remote protocol close the connection, and re-open it at the top of the loop. */ - if (extended_protocol) - { - remote_close (); + detach_inferior (); + remote_close (); + if (extended_protocol) exit (0); - } - else - { + else fprintf (stderr, "Remote side has terminated connection. " "GDBserver will reopen the connection.\n"); - remote_close (); - } sigaction(SIGINT, &old_sigaction, NULL); } }