From: Andrew Cagney <cagney@gnu.org>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: dynamic scope from frame, static scope from ???
Date: Sat, 22 Nov 2003 15:46:00 -0000 [thread overview]
Message-ID: <3FBF84CF.30401@gnu.org> (raw)
In-Reply-To: <vt2y8u8a1h0.fsf@zenia.home>
> Andrew Cagney <cagney@gnu.org> writes:
>
>> GDB's slowly pushing the frame through to the procedures that need
>> access to the dynamic information. However, I don't know that we've
>> addressed the case where a process needs access to the static
>> information? Should there be dogma (similar to "there is always a
>> frame") that covers the static case?
>>
>> Off hand I can think of several ways of doing this:
>>
>> - create a static-frame (it has no dynamic state) and use that
>> - pass the source-and-line or block where needed
>> functions would get both sal and a possibly null frame
>> - pass some new structure that includes other info such as the
>> selected language (if its different to what it should be)?
>
>
> I think the meaning of a static context depends on the language in
> which the user is working. For C and C++, for example, a static
> context needs to include a specific source line, not just a block, so
> as to be able to find which macros are in scope.
True. Per: Can't use [some] macro's in conditional breakpoints
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=856
GDB currently gets this wrong :-(
That rules out block as an option.
> Internally, at least. As far as the user interface is concerned, GDB
> should try to infer the appropriate language automatically.
Right. To do that inference correctly the internals need to know the
users current static context.
The "frame" gives us a path to this information is when the program is
running. I'm asking what should should be used to give us that
information when the program isn't running?
Andrew
next prev parent reply other threads:[~2003-11-22 15:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-22 14:50 Andrew Cagney
2003-11-22 15:07 ` Jim Blandy
2003-11-22 15:46 ` Andrew Cagney [this message]
2003-11-23 4:14 ` 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=3FBF84CF.30401@gnu.org \
--to=cagney@gnu.org \
--cc=gdb@sources.redhat.com \
--cc=jimb@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