[Mono-list] help needed

Serge serge@wildwestsoftware.com
Mon, 26 Nov 2001 17:14:09 +0200


> What I still not understand why the following code does not work (I do
> not use linuxthreads or any other library beside libc):

Hmm, strange - I observed the same behaviour under Linux (ctx->eip is NULL),
while under QNX it works as expected.
BTW, quick and dirty test with incremented EIP works just fine under both
systems:
    ctx->eip+=3 (in place of exit(0) in your code)
    if compiled with -O0,
    instruction is IDIV [EBP-x]
or
    ctx->eip+=2
    when compiled with higher optimization
    instruction is IDIV EDI

BTW, Linux version with sa_handler aparently works even without using
syscall.
If you will find the definite answer why EIP is NULL, please let me know,
I'm confused a bit :-)


Sergey