qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/1] Fix GDB semihosting
@ 2012-02-17 16:21 Meador Inge
  2012-02-17 16:21 ` [Qemu-devel] [PATCH v2 1/1] gdbserver: Don't send a GDB syscall until the system CPU is stopped Meador Inge
  0 siblings, 1 reply; 4+ messages in thread
From: Meador Inge @ 2012-02-17 16:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

Hi All,

GDB semihosting support is broken in the current trunk.  When debugging a
basic "Hello, World" application via the QEMU GDB stub:

   $ qemu-system-arm -s -S -M integratorcp -cpu any --semihosting
     --monitor null --serial null -kernel hello

GDB (7.2.50) receives an interrupt before anything is printed:

   Program received signal SIGINT, Interrupt.

The fundamental issue is that the GDB server implementation sends syscall
requests while the system CPU is still running and isn't prepared to handle
the replies.  This patch fixes the problem by delaying syscall request until
the system CPU has stopped.

* Changes from v1
 - At the suggestion of Peter Maydell I changed the implementation to delay
   sending syscall requests until the CPU has stopped instead of incorrectly
   attempting to just suppress the sending of 'T' status replies.

Meador Inge (1):
  gdbserver: Don't send a GDB syscall until the system CPU is stopped

 gdbstub.c |   44 ++++++++++++++++++++++++++++----------------
 1 files changed, 28 insertions(+), 16 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-06 19:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-17 16:21 [Qemu-devel] [PATCH v2 0/1] Fix GDB semihosting Meador Inge
2012-02-17 16:21 ` [Qemu-devel] [PATCH v2 1/1] gdbserver: Don't send a GDB syscall until the system CPU is stopped Meador Inge
2012-02-20 16:18   ` Peter Maydell
2012-03-06 19:05     ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).