qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] qemu-ppc 'tweq' vs gdb


From: John Reiser
Subject: [Qemu-devel] qemu-ppc 'tweq' vs gdb
Date: Fri, 22 Sep 2017 10:36:14 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

"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 via email to

[Prev in Thread] Current Thread [Next in Thread]