Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jul 2006 23:18:56 +0200
From:      "Attilio Rao" <attilio@freebsd.org>
To:        "Divacky Roman" <xdivac02@stud.fit.vutbr.cz>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: i386 registers during a syscall
Message-ID:  <3bbf2fe10607231418y58510d02ua208acbb44ea9f8c@mail.gmail.com>
In-Reply-To: <20060723112332.GA83581@stud.fit.vutbr.cz>
References:  <20060723112332.GA83581@stud.fit.vutbr.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
2006/7/23, Divacky Roman <xdivac02@stud.fit.vutbr.cz>:
> 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...

Attilio



-- 
Peace can only be achieved by understanding - A. Einstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10607231418y58510d02ua208acbb44ea9f8c>