Ross Ridge:
>With INTO I don't see any way distignuish the SIGSEGV it generates on
>Linux from any of the myriad other ways a SIGSEGV can be generated.

Paolo Bonzini writes:
>sc.eip == 0xCE (if I remember x86 opcodes well :-) as I'm going by heart...)

The INTO instruction generates a trap exception, just like INT 4 would, so
the return address on the stack points to the instruction after the INTO.

>That's similar to how Java traps SIGFPEs and transform them to
>zero-divide exceptions, IIRC.

Floating point exceptions are fault exceptions so the return address
points to the faulting instruction.

At the risk of my curiousity getting me into more trouble, could any
one explain to me how to access these "eip" and "trapno" members from
a signal handler on Linux?  I can't find any relevent documention with
man nor Google.

                                        Ross Ridge

Reply via email to