This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
pending/1528: dynamic scope from frame, static scope from ???
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-gnats at sources dot redhat dot com
- Date: Sat, 22 Nov 2003 09:50:15 -0500
- Subject: pending/1528: dynamic scope from frame, static scope from ???
>Number: 1528
>Category: pending
>Synopsis: dynamic scope from frame, static scope from ???
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: unknown
>Arrival-Date: Mon Jan 19 20:18:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:
>Release:
>Organization:
>Environment:
>Description:
Hello,
(had an interesting hallway conversation)
The languages that GDB debugs, being good old fashoned procedural, have
both a static (compile time) and dynamic (run time) [scope] information.
Static information includes things like the current language, source
line, and the names of variables that are in scope. The dynamic
information includes things like the call chain and the actual location
(instance) of a variable.
Given a live process (or core file), the frame provides access to the
dynamic info, and via the frame's PC, the static information.
Conversely, when there is no program. GDB has the current
source-and-line and that can be used to determine static program
information. For instance, the break command refers to static
information when setting a breakpoint.
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)?
thoughts?
Andrew
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: