From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29799 invoked by alias); 27 Jun 2006 18:31:01 -0000 Received: (qmail 29790 invoked by uid 22791); 27 Jun 2006 18:31:00 -0000 X-Spam-Check-By: sourceware.org Received: from lon-del-02.spheriq.net (HELO lon-del-02.spheriq.net) (195.46.50.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 27 Jun 2006 18:30:58 +0000 Received: from lon-out-02.spheriq.net ([195.46.50.130]) by lon-del-02.spheriq.net with ESMTP id k5RIUgqV028383 for ; Tue, 27 Jun 2006 18:30:42 GMT Received: from lon-cus-02.spheriq.net (lon-cus-02.spheriq.net [195.46.50.38]) by lon-out-02.spheriq.net with ESMTP id k5RIUfdg006705 for ; Tue, 27 Jun 2006 18:30:41 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-02.spheriq.net with ESMTP id k5RIUe7c012967 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 27 Jun 2006 18:30:40 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 909DD107B8; Tue, 27 Jun 2006 14:49:25 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 14F0F47443; Tue, 27 Jun 2006 14:49:23 +0000 (GMT) Received: from [164.129.15.13] (bri1043.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CHT51296 (AUTH stubbsa); Tue, 27 Jun 2006 15:49:22 +0100 (BST) Message-ID: <44A14571.20003@st.com> Date: Thu, 29 Jun 2006 02:27:00 -0000 From: Andrew STUBBS User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Cameron Stone Cc: gdb@sourceware.org Subject: Re: expanding backtrace References: <200606271825.20501.camerons@cse.unsw.edu.au> In-Reply-To: <200606271825.20501.camerons@cse.unsw.edu.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00255.txt.bz2 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. > > Apologies if this has already been dealt with. I couldn't find it in the list > archives. You could write something like while $pc != 0 or while $sp <= $topofmem It depends how your backtraces end.