From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17103 invoked by alias); 27 Mar 2002 21:43:29 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 17091 invoked from network); 27 Mar 2002 21:43:26 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 27 Mar 2002 21:43:26 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9D86F3EF6; Wed, 27 Mar 2002 16:41:43 -0500 (EST) Message-ID: <3CA23C97.10209@cygnus.com> Date: Wed, 27 Mar 2002 13:43:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Daniel Jacobowitz , Andrew Morton Cc: Eli Zaretskii , gdb@sources.redhat.com Subject: Re: bitwise operations on registers References: <3C8CCEAF.2030803@cygnus.com> <20020311103942.A9410@nevyn.them.org> <3C916697.5060302@cygnus.com> <3C9173AD.E2FBA5DA@zip.com.au> <20020315000245.A23867@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00284.txt.bz2 > > Can't really do this, but you can at least: > define current > ((struct task_struct *)($esp & ~8191)) > end > > (gdb) current > $33 = > (gdb) $33->pid You've also got: (gdb) set $current = ($esp & ~8191) but that is only evaluated once (If I remember right). The next step would be to add it to the stop-hook so it is executed after every stop. Andrew