From: Vladimir Prus <ghost@cs.msu.su>
To: gdb@sources.redhat.com
Subject: Evaluating an expression in a given scope
Date: Wed, 07 Sep 2005 12:44:00 -0000 [thread overview]
Message-ID: <dfmn2o$r1t$1@sea.gmane.org> (raw)
Hello!
Does gdb provides a clean way to evaluate an expression in a given scope
(file:line)?
Here's the use case: while in file foo.cpp, line 200, user creates a
watchpoint for expression 'g'. He then stops the GUI debugger and restarts
it again. I want to store the watchpoint in some config file and recreate
it again, but to do that I need a way to create watchpoint at specific
scope. If I just use
print g
or
display g
righ away, this might print some other 'g', not the one visible on line 200
of foo.cpp.
I think I can do this with:
tbreak foo.cpp:100
jump foo.cpp:100
display g
jump <previous source position>
but I have concerns about this being reliable method.
- Volodya
next reply other threads:[~2005-09-07 12:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-07 12:44 Vladimir Prus [this message]
2005-09-07 13:15 ` Daniel Jacobowitz
2005-09-07 13:50 ` Vladimir Prus
2005-09-07 13:53 ` Daniel Jacobowitz
2005-09-07 13:57 ` Daniel Jacobowitz
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='dfmn2o$r1t$1@sea.gmane.org' \
--to=ghost@cs.msu.su \
--cc=gdb@sources.redhat.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).