On 12 févr. 07, at 07:54, Ilya Shar wrote:

I am trying to step through i386-darwin-user/qemu-i386

Program received signal EXC_BAD_ACCESS, Could not
access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x2115eaf5
helper_cmpxchg8b () at ../cpu-all.h:344
344         ((uint32_t *)ptr)[0] = x.p[0];
(gdb)

The offending value of ptr is misalligned, can this
indicate a problem?  Reducing optimization or setting
-g3 doesn't change this behavior.  Strangely, the same
example runs fine without gdb.

qemu will handle the signal fine. Actually it is more a feature than a bug ;-)

Unfortunately
"(gdb) handle EXC_BAD_ACCESS pass"
is kind of broken as EXC_BAD_ACCESS is not translated to the corresponding bsd signal, so qemu won't handle it.

You should probably try to use the gdb interface provided by qemu if you wan't to debug the target program instead of qemu:
# i386-darwin-user/qemu-i386 -g /bin/ls

You can now connect to the gdb interface using:
#gdb -arch i386
(gdb) target remote localhost:1234
(gdb) c

Pierre.

_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to