From: eisen@bozon.SRC.Honeywell.COM (Greg Eisenhauer)
Subject: Re: User requirements on generics
Date: 17 Dec 88 22:58:56 GMT [thread overview]
Message-ID: <13631@srcsip.UUCP> (raw)
In-Reply-To: stachour@umn-cs.CS.UMN.EDU's message of 17 Dec 88 17:06:01 GMT
In article <10479@umn-cs.CS.UMN.EDU> stachour@umn-cs.CS.UMN.EDU (Paul Stachour) writes:
Path: srcsip!ems!amdahl!ames!xanth!nic.MR.NET!umn-cs!stachour
From: stachour@umn-cs.CS.UMN.EDU (Paul Stachour)
Newsgroups: comp.lang.ada
Date: 17 Dec 88 17:06:01 GMT
References: <8812161453.AA02985@aries>
Reply-To: stachour@umn-cs.cs.umn.edu (Paul Stachour)
Organization: CSci Dept., University of Minnesota, Mpls.
Lines: 14
In article <8812161453.AA02985@aries> emery@ARIES.MITRE.ORG (David Emery) writes:
> ...
>Note that code sharing can affect the debugger's ability to do this.
>If code sharing for STACK_PACKAGE is true, then the debugger may not be
>able to support setting a breakpoint inside a specific instance.
Dave, I don't see why this must be true. From the debuggers's viewpoint,
one sets a breakpoint in the shared-code for the generic. When the
breakpoint is hit, the debugger checks the context of the breakpoint
with respect to who did the calling from what line, etc., and thus can
determine from the symbol-table info which instance of the generic that
it is actually in. The breakpoint is "taken" if that is the instance
in which the breakpoint was set, otherwise the breakpoint is "ignored".
...Paul
The "symbol-table information" that you propose to use would have to be much
more complex than the information that is generated and used in many systems.
A simple virtual-address to source-line mapping, as is produced by the Verdix
Ada system is not sufficient. Consider that you may have calls to several
generic instantiations in a single source line. It will be difficult for the
debugger to figure out which call is actually being performed. It can perhaps
be done, but if you think about a case like a lengthy expression where all of
the operators are generic instantiations with shared bodies, things get hairy
fast.
An easier approach might be to create a stub subprogram for each instantiation
that did nothing but call the shared code. That way the debugger would have
something unique on the call stack for each instantiation. Unfortunately, you
also have the expense of 2 procedure calls where you got by with one before.
Might be too high a price to pay just to be able to set breakpoints in
separate shared instantiations. Another option would be to have the compiler
generate an extra parameter to generic routines that identified the
instantiation. Verdix does this for other reasons, so it should be feasable
for the debugger to use it to disambiguate the call.
Greg Eisenhauer, Honeywell SRC Socrates, Pythagoras,
Phone: (612) 782-7318 Yin and bloody Yang,
MAIL: 3660 Technology Drive, Mpls, MN Hatha Yoga, Ommm,
ARPA: eisen@src.honeywell.com Bennet, Gurdjieff, Jesus
UUCP: {umn-cs,ems,bthpyd}!srcsip!eisen -- Peter Murphy
prev parent reply other threads:[~1988-12-17 22:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1988-12-16 14:53 User requirements on generics David Emery
1988-12-17 17:06 ` Paul Stachour
1988-12-17 22:58 ` Greg Eisenhauer [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox