Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Arjan van Dijk <a.vandijk@phys.uu.nl>
Cc: gdb@sources.redhat.com
Subject: Re: How to set a watch to a point in the source?
Date: Tue, 30 Jul 2002 10:20:00 -0000	[thread overview]
Message-ID: <npfzy1uo83.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <v03130309b96c02d74826@[131.211.32.140]>


Arjan van Dijk <a.vandijk@phys.uu.nl> writes:
> 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.

GDB doesn't keep any information about the location of a variable's
declaration --- that I can find, anyway.  I think you're out of luck.

What GDB can do, however, is find the definition in scope at a
particular source line.  If you could parse out the variable name from
the source, and then look up that name in the context of that source
line, then you could get the right variable.  I don't know of any
existing interface for doing that; so you'd need to hack on GDB either
way.

(Am I missing some MI capability or something?  I'd love to be wrong.)


      reply	other threads:[~2002-07-30 17:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30  2:04 Arjan van Dijk
2002-07-30 10:20 ` Jim Blandy [this message]

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=npfzy1uo83.fsf@zwingli.cygnus.com \
    --to=jimb@redhat.com \
    --cc=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