From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 23 21:18:59 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 1432D16A4DD for ; Sun, 23 Jul 2006 21:18:59 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 964F243D45 for ; Sun, 23 Jul 2006 21:18:58 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0102.google.com with SMTP id i31so697660wxd for ; Sun, 23 Jul 2006 14:18:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=J2q9NImaoqUCurgSuQMfaDfV0tzIRuKAegzm40gMrDhhl7iTyCbwlHD0U7NXNUWbvDcB6gbTFQ1/Ti5OOlgqCnYY8HKSgtDfScnCFFkDgNlReKJbYoOfpiR4bLf4n+NYrv8+Ra9Pkl8a/N/xrjgzESrpTgxQhAfZ2Mc+rb1/X1k= Received: by 10.70.29.4 with SMTP id c4mr4001710wxc; Sun, 23 Jul 2006 14:18:57 -0700 (PDT) Received: by 10.70.24.4 with HTTP; Sun, 23 Jul 2006 14:18:56 -0700 (PDT) Message-ID: <3bbf2fe10607231418y58510d02ua208acbb44ea9f8c@mail.gmail.com> Date: Sun, 23 Jul 2006 23:18:56 +0200 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Divacky Roman" In-Reply-To: <20060723112332.GA83581@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060723112332.GA83581@stud.fit.vutbr.cz> X-Google-Sender-Auth: a80f7c4efd237da0 Cc: 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: Sun, 23 Jul 2006 21:18:59 -0000 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... Attilio -- Peace can only be achieved by understanding - A. Einstein