Friday, March 28, 2008

Wednesday, March 26, 2008

Looking for "strace" for windows?

This one is windows' equivalent of linux's strace:
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

Sunday, March 9, 2008

System Call Argument Passing

X86:

Windows:
The system call number is passed in the EAX register, and the stack stores the caller arguments.

Linux:
http://manugarg.googlepages.com/systemcallinlinux2_6.html

X64:

Windows:
A system-call is done via the syscall instruction. Parameters are passed by %rcx,%rdx, %r8 and %r9, the rest are passed on stack.

Linux:
A system-call is done via the syscall instruction. Parameters are passed by %rdi,%rsi, %rdx, %r10, %r8 and %r9.The kernel destroys
registers %rcx and %r11.