From: John Reiser <jreiser@bitwagon.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] qemu-ppc 'tweq' vs gdb
Date: Fri, 22 Sep 2017 10:36:14 -0700 [thread overview]
Message-ID: <ee4887b4-5c75-b6e8-6fa6-11d73b80f81a@bitwagon.com> (raw)
"qemu-ppc -g 1234 foo" emulating the 32-bit PowerPC instruction 0x7c800008
("tweq r0,r0") terminates with "fatal: Tried to call a TRAP".
Instead, when co-operating with gdbserver (-g <port>) then qemu-ppc
should generate a SIGTRAP, just like real execution under gdb.
The "tweq r0,r0" and others are useful as compiled-in breakpoints,
particularly when the location is within just-in-time compiled code.
They also can be used without gdb (in which case execution aborts
if the trap is true), and even with gdb if the condition is false
then they are thousands of times faster than a gdb breakpoint
that has a conditional stop.
--
John
reply other threads:[~2017-09-22 17:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=ee4887b4-5c75-b6e8-6fa6-11d73b80f81a@bitwagon.com \
--to=jreiser@bitwagon.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).