comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: debugging tool?
Date: Mon, 23 Feb 2004 01:21:00 GMT
Date: 2004-02-23T01:21:00+00:00	[thread overview]
Message-ID: <Yzc_b.377591$xy6.1981921@attbi_s02> (raw)
In-Reply-To: mailman.11.1077491943.327.comp.lang.ada@ada-france.org

> Right. So put in a flag Object.Finalized, and check Object.Finalized
> in _every_ operation on Object. Raise an exception, or silently do
> nothing, your choice.
> >   Main_Object : Main_Object_Type;      -- Controlled type
> >   Helper_Object : Helper_Object_Type;  -- also Controlled
By "Object" here you must mean Main_Object_Type, right?  So
  type Main_Object_Type is new Ada.Finalization.Controlled with record
    Helper_Finalized : Boolean
    ...
That's great for future development, but I'm look for something to
automatically examine a large body of existing code.  Often
Main_Object_Type doesn't know much at all about Helper_Object_Type, and
may well have been coded long before someone added a helper type.  (eg,
Helper_Type keeps a usage count of Main_Object_Type's and does something
when they've all gone away.  Even if Helper_Type is a simple integer, it's
questionable to access it after it's de-elaborated=finalized).
In general, I'd like a tool (if not the compiler) to catch non-obvious
errors like this.



  reply	other threads:[~2004-02-23  1:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-21  5:56 debugging tool? tmoran
2004-02-22 21:25 ` Hyman Rosen
2004-02-22 22:17   ` tmoran
2004-02-22 23:18     ` Stephen Leake
2004-02-23  1:21       ` tmoran [this message]
2004-02-23  1:31         ` tmoran
2004-02-23  3:54           ` Stephen Leake
2004-02-23  5:43             ` tmoran
2004-02-23  3:34         ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox