Date: Mon, 24 Jul 2006 10:04:10 +0200 From: Divacky Roman <xdivac02@stud.fit.vutbr.cz> To: Attilio Rao <attilio@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: i386 registers during a syscall Message-ID: <20060724080410.GA39744@stud.fit.vutbr.cz> In-Reply-To: <3bbf2fe10607231418y58510d02ua208acbb44ea9f8c@mail.gmail.com> References: <20060723112332.GA83581@stud.fit.vutbr.cz> <3bbf2fe10607231418y58510d02ua208acbb44ea9f8c@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 23, 2006 at 11:18:56PM +0200, Attilio Rao wrote: > 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... mov $123, %esi int $0x80 ; syscall I need the value of %esi (ie. 123) is td->td_frame->tf_esi what I need? thnx roman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060724080410.GA39744>