site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Also, forgive me if I have my x86 terminology wrong here. Thanks, Cyrus _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This may sound a bit sketchy, as it only happens somewhat sporadically, but when it happens, bad things happen. I'm working on an x86 port of a compiler that makes heavy use of trapping in it's runtime environment and things basically seem to work pretty well at this point. My problem is that every now and then, I try to trap with an x86 INT3 (opcode CC) and our SIGTRAP handler takes a look at the byte following the CC, gets the appropriate "arguments" by looking at the instruction data just after the EIP, fixes up the EIP to skip over these arguments and goes on its merry way. This all works well enough, except when it doesn't, which is to say that occasionally it seems that I just walk across the INT3 without the SIGTRAP handler being called, and get a SEGV when the CPU tries to execute the instruction immediately following the INT3, which was supposed to be skipped over by the code that fixes up the EIP in the signal handler. Yes, this is all a bit messy, but the frustrating part is that most of the time this works. Is anyone else seeing instances where INT3 traps aren't being called? Any suggestions on where to look in the Darwin sources to see if there's anything amiss? This works fine on Darwin/ppc and, FWIW, {freebsd,linux}/x86 and mostly works on Darwin/ x86, but this one thing is causing some rather major problems. Any suggestions or advice on dealing with this would be greatly appreciated. This email sent to site_archiver@lists.apple.com