From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,836e7962fed7281b,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-20 21:56:33 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!204.127.198.202.MISMATCH!wn52feed!worldnet.att.net!attbi_s51.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: debugging tool? X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 67.161.24.134 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s51 1077342992 67.161.24.134 (Sat, 21 Feb 2004 05:56:32 GMT) NNTP-Posting-Date: Sat, 21 Feb 2004 05:56:32 GMT Organization: Comcast Online Date: Sat, 21 Feb 2004 05:56:32 GMT Xref: archiver1.google.com comp.lang.ada:5705 Date: 2004-02-21T05:56:32+00:00 List-Id: Is there a tool around that would scan a large program to check for instances of an object being accessed *after* it's been Finalized? As in this program, where two compilers happily allow just that for Helper, and a third doesn't, but gives no error message. with ada.finalization; package testff1 is type A is new ada.finalization.controlled with null record; procedure Finalize(x : in out A); AA : A; private type Helper_Type(id : integer) is new ada.finalization.controlled with null record; procedure Finalize(x : in out Helper_Type); procedure dummy(x : in out Helper_Type); end testff1; with ada.text_io; package body testff1 is Helper : Helper_Type(1); procedure Finalize(x : in out Helper_Type) is begin ada.text_io.put_line("finalize helper" & integer'image(x.id)); end Finalize; procedure dummy(x : in out Helper_Type) is begin ada.text_io.put_line("process Helper" & integer'image(x.id)); end dummy; procedure Finalize(x : in out A) is begin ada.text_io.put_line("finalize A"); dummy(Helper); end Finalize; end testff1; with ada.exceptions; with ada.text_io; with testff1; procedure testff is My_A : testff1.A; begin ada.text_io.put_line("main"); exception when oops:others=>ada.text_io.put_line(ada.exceptions.exception_information(oops)); end testff;