From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 23 18:30:27 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 4C4A616A420 for ; Thu, 23 Feb 2006 18:30:27 +0000 (GMT) (envelope-from pranav.sawargaonkar@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 661D743D46 for ; Thu, 23 Feb 2006 18:30:26 +0000 (GMT) (envelope-from pranav.sawargaonkar@gmail.com) Received: by wproxy.gmail.com with SMTP id i3so430637wra for ; Thu, 23 Feb 2006 10:30:25 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=d85xa9ko4bmBbtslV2U7WxYRYpK/A1ws+zcUFySdcgDeHAesCOUfAA9raywi0XYIwO/GrGdpDNXSmDLI6/CJVp0iMOpSO/XbrOXgL/VaoUww7EH60sIU9udXVOECGE1Z0RAgVH4gD6qFnrp2Hm9cXzlNqhlqA6VckflcX9S46cg= Received: by 10.54.61.12 with SMTP id j12mr529639wra; Thu, 23 Feb 2006 10:30:25 -0800 (PST) Received: by 10.54.119.17 with HTTP; Thu, 23 Feb 2006 10:30:25 -0800 (PST) Message-ID: <5007e1a40602231030k7e3f74f4u72657dba4da5975c@mail.gmail.com> Date: Fri, 24 Feb 2006 00:00:25 +0530 From: "Pranav Sawargaonkar" To: "bachi@te-clan.ch" In-Reply-To: <41209.193.134.254.115.1140701869.squirrel@webmail.te-clan.ch> MIME-Version: 1.0 References: <5007e1a40602230148g6b8e05ack781e9a70125dba8a@mail.gmail.com> <41209.193.134.254.115.1140701869.squirrel@webmail.te-clan.ch> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Saving register values 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: Thu, 23 Feb 2006 18:30:27 -0000 Thanks for reply. Actually i want to save cpu registers values just before the time of shutdown that is why i am asking question.So is it possible for me to do that?and if possible how should approach for it? Thanks in advance. On 2/23/06, bachi@te-clan.ch wrote: > > > I want to access cpu registers > I don't know if this helps. > > [...] > #include > [...] > ucontext_t ctx; > getcontext(&ctx); > printf("%#010x\n", ctx.uc_mcontext.mc_eax); > [...] > > Look at /usr/include/ucontext.h > > greets > > Andreas > > > >