From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 24 09:07:20 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A84E016A4DD; Mon, 24 Jul 2006 09:07:20 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58C9443D49; Mon, 24 Jul 2006 09:07:20 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [192.168.2.2]) ([10.251.60.31]) by a50.ironport.com with ESMTP; 24 Jul 2006 02:07:19 -0700 Message-ID: <44C48DC7.6050305@elischer.org> Date: Mon, 24 Jul 2006 02:07:19 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Divacky Roman References: <20060723112332.GA83581@stud.fit.vutbr.cz> <3bbf2fe10607231418y58510d02ua208acbb44ea9f8c@mail.gmail.com> <20060724080410.GA39744@stud.fit.vutbr.cz> In-Reply-To: <20060724080410.GA39744@stud.fit.vutbr.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Attilio Rao , freebsd-hackers@freebsd.org Subject: Re: i386 registers during a syscall X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2006 09:07:20 -0000 Divacky Roman wrote: >On Sun, Jul 23, 2006 at 11:18:56PM +0200, Attilio Rao wrote: > > >>2006/7/23, Divacky Roman : >> >> >>>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" > >