Divacky Roman wrote:

On Sun, Jul 23, 2006 at 11:18:56PM +0200, Attilio Rao wrote:
2006/7/23, Divacky Roman <[EMAIL PROTECTED]>:
hi,

I need to get content of %esi register as it was during a syscall. Should I get
this info from td->td_pcb->pcb_esi or td->td_frame->tf_esi?

Is it so that trapframe is "content of registers when entering a kernel" and
pcb is "when leaving a kernel" ?

thnx for info
pcb and trapframe are used for very different purposes.

The trapframe is built into the exception handler and it is used as
'registers gate' from userspace/kernelspace.

The pcb (process control block) is used to handle registers saving
during a context switch, so it seems completely ortogonal to your
problem.

BTW, it's unclear to me what do you need...

mov $123, %esi
int $0x80               ; syscall

I need the value of %esi (ie. 123)

is td->td_frame->tf_esi what I need?

yes

thnx

roman
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to