qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Meador Inge <meadori@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v1 1/1] gdbserver: Keep VM state status replies from happening during a syscall
Date: Wed, 15 Feb 2012 10:55:14 -0600	[thread overview]
Message-ID: <1329324914-12296-2-git-send-email-meadori@codesourcery.com> (raw)
In-Reply-To: <1329324914-12296-1-git-send-email-meadori@codesourcery.com>

Fix an issue where the GDB server implementation was allowing 'RUN_STATE_DEBUG'
transitions to send a signal trap status back to the GDB client while a syscall
is being processed.  This eventually resulted in sending a SIGINT to the GDB
client.

Signed-off-by: Meador Inge <meadori@codesourcery.com>
---
 gdbstub.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gdbstub.c b/gdbstub.c
index 7d470b6..34d2717 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2480,7 +2480,6 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...)
 #ifndef CONFIG_USER_ONLY
     vm_stop(RUN_STATE_DEBUG);
 #endif
-    s->state = RS_IDLE;
     va_start(va, fmt);
     p = buf;
     *(p++) = 'F';
@@ -2557,6 +2556,8 @@ static void gdb_read_byte(GDBState *s, int ch)
 #endif
     {
         switch(s->state) {
+        case RS_SYSCALL:
+            s->state = RS_IDLE;
         case RS_IDLE:
             if (ch == '$') {
                 s->line_buf_index = 0;
-- 
1.7.7.6

  reply	other threads:[~2012-02-15 16:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-15 16:55 [Qemu-devel] [PATCH v1 0/1] Fix GDB semihosting Meador Inge
2012-02-15 16:55 ` Meador Inge [this message]
2012-02-15 17:54   ` [Qemu-devel] [PATCH v1 1/1] gdbserver: Keep VM state status replies from happening during a syscall Blue Swirl
2012-02-15 17:55     ` Meador Inge
2012-02-15 18:26 ` [Qemu-devel] [PATCH v1 0/1] Fix GDB semihosting Peter Maydell
2012-02-15 20:14   ` Peter Maydell
2012-02-16 18:39     ` Meador Inge
2012-02-16 19:08       ` Peter Maydell
2012-02-17  2:35         ` Meador Inge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329324914-12296-2-git-send-email-meadori@codesourcery.com \
    --to=meadori@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).