From: Dave Denholm <ddenholm@esmertec.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] gdb support for qemu-mips (user mode)
Date: Wed, 25 Oct 2006 13:04:12 +0100 [thread overview]
Message-ID: <km1wowk3er.fsf@dalmore.esmertec.com> (raw)
In-Reply-To: <kmac44qrz7.fsf@dalmore.esmertec.com> (Dave Denholm's message of "Tue, 10 Oct 2006 13:23:56 +0100")
Hi,
user-mode emulation of mips allows gdb to connect and set
breakpoints, but when the breakpoint is reached, the emulator bombs
out with an unhandled cpu exception 0x10002 (or something like that).
I think it's just a missing case EXCP_DEBUG in the mips-specific
cpu_loop in linux-user/main.c (around line 1301 in 0.8.2)
Since all the other archs do exactly the same thing for EXCP_DEBUG, I
just pasted that code into the mips version, and it seemed to work, at
least a bit - when I was single-stepping through a fn, gdb got stuck
complaining that it couldn't find a fn for a given ip address.
dd
--
Dave Denholm <ddenholm@esmertec.com> http://www.esmertec.com
--- linux-user/main.c.~1~ 2006-07-22 18:23:34.000000000 +0100
+++ linux-user/main.c 2006-10-25 11:14:30.752887950 +0100
@@ -1350,6 +1350,20 @@
case EXCP_INTERRUPT:
/* just indicate that signals should be handled asap */
break;
+ case EXCP_DEBUG:
+ {
+ int sig;
+
+ sig = gdb_handlesig (env, TARGET_SIGTRAP);
+ if (sig)
+ {
+ info.si_signo = sig;
+ info.si_errno = 0;
+ info.si_code = TARGET_TRAP_BRKPT;
+ queue_signal(info.si_signo, &info);
+ }
+ }
+ break;
default:
// error:
fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n",
next prev parent reply other threads:[~2006-10-25 12:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-10 12:23 [Qemu-devel] qemu-mips on x86: stat() broken in 0.8.2 Dave Denholm
2006-10-25 12:04 ` Dave Denholm [this message]
2006-10-25 13:43 ` [Qemu-devel] qemu user mode spins when stopped at a breakpoint Dave Denholm
2006-11-04 4:20 ` [Qemu-devel] gdb support for qemu-mips (user mode) Daniel Jacobowitz
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=km1wowk3er.fsf@dalmore.esmertec.com \
--to=ddenholm@esmertec.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).