- it also tries to read/write to the debug registers. this produces an
unhandled exception. should be trivial to write an exception handler to support that (right ?)
how does it do the writing exactly ? (I'd suspect more the program wants to catch itself a watchpoint)
bool detect_debugger_from_TIB { char *pTIB; asm ( "mov %%fs:0x18, %", "=g"(pTIB) ); if ( pTIB[0x20] == 0 ) return FALSE; else return TRUE; }
fs:0x18 points in memory to the TEB structure and offset 0x20 (from thread.h) says: 20 Process id (win95: debug context) so I assume you run it on Win9x, and got it tested this way (I wouldn't be surprised that under nt it did test dword 0x64 and/or 0x68)
basically, wine shouldn't be too far away for correctly allowing this
the debug register stuff seems to be the showstopper right now
A+