This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: expanding backtrace


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]