This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: expanding backtrace
- From: Daniel Jacobowitz <drow at false dot org>
- To: Cameron Stone <camerons at cse dot unsw dot edu dot au>
- Cc: gdb at sourceware dot org
- Date: Tue, 27 Jun 2006 08:17:42 -0400
- Subject: Re: expanding backtrace
- References: <200606271825.20501.camerons@cse.unsw.edu.au>
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