| Hello (recycled)
| I was trying to trace the handling of the system calls, and to step through
| the entry.S on i386 machine. I basically used this:
| srin_entryS_debug_mesg: #My addition
| .asciz "some relevant message\n"
| tracesys: #haven't changed anything here..
| jae tracesys_exit
| pushl $srin_entryS_debug_mesg #just this
| call SYMBOL_NAME(printk) # and this
| call *SYMBOL_NAME(sys_call_table)(,%eax,4)
| movl %eax,EAX(%esp) # save the return value
| Shouldn't this call printk everytime a system call is made or atleast crash
| the kernel if something is dead wrong ? ( It isn't .. everything seems normal
| as though the printk isn't there ) Also, how can i know the values in the
| specific registers in that file ? Specifically, whenever a system call is
| made, what registers store what values ? I'm using kernel 2.4.7 on a K6-2.
The tracesys: label (code) is only used if ptrace is enabled for
the task. Is it enabled? If not, you aren't executing this code
testb $0x02,tsk_ptrace(%ebx) # PT_TRACESYS
For the register interface, AFAIK, see the gcc docs, such as
Extensions to the C Language Family:
and search for /regparm/ .
On the Intel 386, the regparm attribute causes the compiler to pass up
to number integer arguments in registers EAX, EDX, and ECX instead of
on the stack. Functions that take a variable number of arguments will
continue to be passed all of their arguments on the stack.
Someone please correct or add to this. :)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/