On Thu, Jul 07, 2005 at 12:21:01PM -0400, Justin Pryzby wrote: > Package: gdb > Severity: normal > Version: 6.3-6 > > I'm a clueless GDB user. I wanted to write a GDB script, and the only > thing I haven't been able to figure out is how to get the frame number > (I want to know how many frames are in the backtrace).
Can't do it. GDB doesn't offer a particularly powerful scripting interface at the moment, although we keep making noises about proper integration (probably Guile, or Python). > Anyway, I was fooling around with it anyway, to try to figure things > out, and I made gdb segfault: > > $ gdb > ... > (gdb) - bogus > ... > > Gdb apparently tries to run its TUI, but crashes instead. > > Segmentation fault Wu Zhou fixed this in GDB CVS last week, fortunately. I'll pull the patch into the next upload. > Besides fixing the bug, could anyone tell me how to get what I want? > (The count of stack frames), and maybe even explain how to use this > magical MI interface? You could use the MI interface, but it won't integrate nicely with CLI scripting; it's designed for external frontends to control GDB. -- Daniel Jacobowitz CodeSourcery, LLC -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

