This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: (Not) debugging STL
Hi,
It seems to me that variable 'gud-last-last-frame' contains the name of
current source file. Thus I tried the following.
(defun my-step ()
(interactive)
(gud-step 1)
(while (string-match "/usr/.*" (car gud-last-last-frame))
(gud-step 1)))
However this did not work, I think because gud-step doesn't seem to
update the variable gud-last-last-frame. At least the following function
always prints the same string twice.
(defun m-step ()
(interactive)
(print (car gud-last-last-frame))
(gud-step 1)
(print (car gud-last-last-frame))
)
What to do then? Shall I use something else instead of gud-step?
Alpar
> On Sat, 2007-03-03 at 13:58 +0100, Alpár Jüttner wrote:
> > > Then, my next idea is to use the gdb interface of emacs. It should be
> > > trivial to do a lisp function doing this, but I couldn't figure out how
> > > to do that.
> >
> > I'm not sure that I understand exactly what you're trying to do, but if
> > Daniel says it can't be done in GDB, then I dont think it can be done in
> > Emacs, as Emacs can only use the output that GDB gives it.
>
> At first, I would simply write an emacs function that iterates the gdb
> 'step' command until we get out of any files whose full name starts
> say /usr.
> >
> > > For example how to obtain the file name of the currently
> > > debugged line in emacs/gud/gdb?
> > ...
> > from the command line, then step a few times. You'll see the current line,
> > that Emacs uses, get printed out.
>
> I understand, that emacs parses this line, so I would like to know how
> to have emacs to tell me the file name.
>
> Regards,
> Alpar
>