From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17890 invoked by alias); 27 Jun 2006 12:17:47 -0000 Received: (qmail 17881 invoked by uid 22791); 27 Jun 2006 12:17:46 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 27 Jun 2006 12:17:45 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FvCVi-0001zs-Ek; Tue, 27 Jun 2006 08:17:42 -0400 Date: Wed, 28 Jun 2006 14:02:00 -0000 From: Daniel Jacobowitz To: Cameron Stone Cc: gdb@sourceware.org Subject: Re: expanding backtrace Message-ID: <20060627121742.GA7612@nevyn.them.org> Mail-Followup-To: Cameron Stone , gdb@sourceware.org References: <200606271825.20501.camerons@cse.unsw.edu.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200606271825.20501.camerons@cse.unsw.edu.au> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00253.txt.bz2 On Tue, Jun 27, 2006 at 06:25:19PM +1000, Cameron Stone wrote: > I'm trying to write a script to print an expanded backtrace. It's basically: > > while loop_condition > print frame > print local variables > print list (context) > up-silently > end > > However, I can't figure out how to implement the loop condition. All the > functions in the manual are about how to print that information, but can't > figure out how to get it into a variable or something that can be used to > break the loop. You can't; the GDB CLI just doesn't support this sort of thing. However, I'm vaguely hopeful that we'll have better scripting support in time for the next release. "while 1" might work, since the last "up" will raise an error. "bt full" handles the frame and local variables already, btw, but I don't think it lists. -- Daniel Jacobowitz CodeSourcery