From: "Alpár Jüttner" <alpar@cs.elte.hu>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Daniel Jacobowitz <drow@false.org>, gdb@sourceware.org
Subject: Re: (Not) debugging STL
Date: Sat, 03 Mar 2007 14:36:00 -0000 [thread overview]
Message-ID: <1172932555.4011.25.camel@mikro.mikro> (raw)
In-Reply-To: <1172926723.4011.11.camel@mikro.mikro>
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
>
next prev parent reply other threads:[~2007-03-03 14:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-01 12:05 Alpár Jüttner
2007-03-01 12:19 ` Daniel Jacobowitz
2007-03-01 12:40 ` Alpár Jüttner
2007-03-01 12:46 ` Daniel Jacobowitz
2007-03-03 10:46 ` Alpár Jüttner
2007-03-03 11:34 ` Nick Roberts
2007-03-03 13:00 ` Alpár Jüttner
2007-03-03 14:36 ` Alpár Jüttner [this message]
2007-03-03 19:24 ` Nick Roberts
2007-03-05 12:39 ` Daniel Jacobowitz
2007-03-01 17:56 ` Brian Dessent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1172932555.4011.25.camel@mikro.mikro \
--to=alpar@cs.elte.hu \
--cc=drow@false.org \
--cc=gdb@sourceware.org \
--cc=nickrob@snap.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox