Skip to contentSkip to conversation

Signal handling for i386-darwin-user on Mac Intel

Qemu-devel Ilya Shar 1 participant 1 message Feb 5, 2007

lore
Share & tools
lore

Ilya Shar

author
#0 lore raw

Thanks to pointers/patches from Mike and Pierre, I can build i386-darwin-user binary. There is a glitch though with signal-handling. The following fragment in cpu_signal_handler() in cpu-exec.c

    pc = uc->uc_mcontext.gregs[REG_EIP];
    trapno = uc->uc_mcontext.gregs[REG_TRAPNO];

appears to be Linux-specific and gives compilation errors on a Mac:

/Users/ilya/tmp/feb4/qemu_cvs_user/qemu/cpu-exec.c: In function 'cpu_x86_signal_handler':
/Users/ilya/tmp/feb4/qemu_cvs_user/qemu/cpu-exec.c:1307:
error: request for member 'gregs' in something not a structure or union /Users/ilya/tmp/feb4/qemu_cvs_user/qemu/cpu-exec.c:1307:
error: 'EIP' undeclared (first use in this function)
...

When I dummy-out cpu_signal_handler() the binary compiles, but I cannot run anything because the signals are not handled.

Is there a patch/solution to this?

Thanks again for your help!
Ilya

____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/