From: Jason Wessel <jason.wessel@windriver.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] gdbstub.c fix for SIGINT
Date: Mon, 17 Apr 2006 08:12:01 -0500 [thread overview]
Message-ID: <44439421.9060100@windriver.com> (raw)
In-Reply-To: <1137652046.8132.11.camel@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 650 bytes --]
Attached is a patch to add the case for interrupting the gdbstub and
sending the correct signal to gdb.
The gdb serial protocol states that if you interrupt the stub with a
"control-c" in gdb that it should stop with S02 (SIGINT) to indicate
that it was interrupted. I also added the tlb flush so that
breakpoints can be written in correctly. I found that if I ran a
pentium qemu instance and broke in with gdb and planted a breakpoint at
do_fork() that it was not immediately hit due to the lack of the
flush. With the patch, it reliably stops all the time now when a
breakpoint is planted after interrupting the stub.
Thanks,
Jason.
[-- Attachment #2: gdbstub.c.patch --]
[-- Type: text/plain, Size: 923 bytes --]
Index: Changelog
===================================================================
RCS file: /sources/qemu/qemu/Changelog,v
retrieving revision 1.111
diff -u -r1.111 Changelog
--- Changelog 12 Apr 2006 21:09:31 -0000 1.111
+++ Changelog 17 Apr 2006 13:05:57 -0000
@@ -2,6 +2,7 @@
- USB tablet support (Brad Campbell, Anthony Liguori)
- win32 host serial support (Kazu)
+ - Fix SIGINT handler for gdbstub
version 0.8.0:
Index: gdbstub.c
===================================================================
RCS file: /sources/qemu/qemu/gdbstub.c,v
retrieving revision 1.34
diff -u -r1.34 gdbstub.c
--- gdbstub.c 5 Dec 2005 19:55:19 -0000 1.34
+++ gdbstub.c 17 Apr 2006 13:05:57 -0000
@@ -654,6 +654,9 @@
if (reason == EXCP_DEBUG) {
tb_flush(s->env);
ret = SIGTRAP;
+ } else if (reason == EXCP_INTERRUPT) {
+ tb_flush(s->env);
+ ret = SIGINT;
}
else
ret = 0;
next prev parent reply other threads:[~2006-04-17 13:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-19 6:27 [Qemu-devel] Solaris Linux x86 binary compatibility Peter Firmstone
2006-04-17 13:12 ` Jason Wessel [this message]
2006-04-19 18:16 ` [Qemu-devel] [PATCH] gdbstub.c fix for SIGINT Mulyadi Santosa
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=44439421.9060100@windriver.com \
--to=jason.wessel@windriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.