qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-ppc 'tweq' vs gdb
@ 2017-09-22 17:36 John Reiser
  0 siblings, 0 replies; only message in thread
From: John Reiser @ 2017-09-22 17:36 UTC (permalink / raw)
  To: qemu-devel

"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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-22 17:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-22 17:36 [Qemu-devel] qemu-ppc 'tweq' vs gdb John Reiser

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).