How is Win/Dos syscalls implemented in Wine?
eric.pouech at wanadoo.fr
Fri Oct 25 14:23:15 CDT 2002
> Ok, I think I get it (never been much into Windoze codeing)...
> Windows "syscalls" is also actually done by requesting a dll mapping
> and calling the system_function inside processed mapped memory.
> Am I right so far?
it's how it's done in windows. it doesn't mean wine implement it the
basically in win NT, all systems calls are made from ntdll
ntdll in turn issues system call to the "internal" system
wine doesn't implement such a mechanism, nor does it allow to run the
it just reimplements the ntdll (and uses the wineserver, which can be
as many regards as the windows internal system)
> Is the dll mapping event, itself raised by some kind of SIGSEGV signal?
no, just pure function calls
> About the DOS/Windows interrupts: Is it really sure that trusting SIGSEGV is
> safe? What happens for instance in this case:
> EAX (ackumulator register)= (char *) "$HOME"
> and an instruction interupt 10h (Linux unlink syscall)?
> This is a fully correct Linux syscall, wich would remove
> the users homedirectory if called, and would not raise a SIGSEGV signal.
> How would Wine stop this?
wine doesn't stop linux syscall from happenning (btw, linux doesn't use
interrupt 10, but 0x80. you must refer to the operation code in linux
what Ove describe is only valid for bios and msdos interrupts. we don't
emulate nt system calls
> I know wine uses the ptrace syscall, is that really only
> for debugging purposes, or is it for catching the SIGSEGV
> signals also?
not only debugging. also for cross process memory manipulation for
More information about the wine-devel