From: Arjan van Dijk <a.vandijk@phys.uu.nl>
To: gdb@sources.redhat.com
Subject: How to set a watch to a point in the source?
Date: Tue, 30 Jul 2002 02:04:00 -0000 [thread overview]
Message-ID: <v03130309b96c02d74826@[131.211.32.140]> (raw)
Hi,
Can someone tell me please if and how I can instruct gdb to do the following?
I want to add a certain variable to the display list by specifying its
position in the source code.
The option to specify the source-file name is too coarse, since there are
many routines in one file and they all have variables with similar names
(e.g. a counter named "i"). The option to give the name of the routine
would do the job, but then I would have to find out to which routine the
variable belongs. With nested subroutines this is a terrible job. For
setting breakpoints I found out that one can specify either a subroutine
name or a linenumber. For setting watches I could not find an equivalent
for the latter.
Background: I am working on a set of macro-commands for the editor NEdit to
collaborate with gdb via a shell-link. With a keystroke in NEdit I can
select the variable under the cursor and send the filename, linenumber and
column number to gdb. Making a macro that determines to which subroutine
that variable belongs is no fun.
Thanks for any suggestion,
Arjan
Arjan van Dijk
Institute for Marine and Atmospheric Research Utrecht
Faculty of Physics and Astronomy
Utrecht University
Princetonplein 5
NL - 3584 CC Utrecht
The Netherlands
phone: +31 30 2532815
fax: +31 30 2543163
e-mail: mailto:A.vanDijk@phys.uu.nl
homepage: http://www.phys.uu.nl/~vndijk
next reply other threads:[~2002-07-30 9:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-30 2:04 Arjan van Dijk [this message]
2002-07-30 10:20 ` Jim Blandy
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='v03130309b96c02d74826@[131.211.32.140]' \
--to=a.vandijk@phys.uu.nl \
--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