Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 2006 02:07:19 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Divacky Roman <xdivac02@stud.fit.vutbr.cz>
Cc:        Attilio Rao <attilio@freebsd.org>, freebsd-hackers@freebsd.org
Subject:   Re: i386 registers during a syscall
Message-ID:  <44C48DC7.6050305@elischer.org>
In-Reply-To: <20060724080410.GA39744@stud.fit.vutbr.cz>
References:  <20060723112332.GA83581@stud.fit.vutbr.cz>	<3bbf2fe10607231418y58510d02ua208acbb44ea9f8c@mail.gmail.com> <20060724080410.GA39744@stud.fit.vutbr.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
Divacky Roman wrote:

>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?
>  
>

yes

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



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