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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,91c5b958fecf5eff X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: GNAT exception traceback Date: 1997/06/14 Message-ID: #1/1 X-Deja-AN: 248381288 References: <339EFAE3.26C@ccis.adisys.com.au> <33A287A6.7C16@dtek.chalmers.se> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-06-14T00:00:00+00:00 List-Id: Steve says <> Two things to be aware of with this suggestion. 1. If your compiler uses an approach that costs entry time when an exception handler is declared, this might cause significant slow down in execution time. GNAT is currently like this. This approach results in fast exception propagation but at the cost of slow setup time on handlers. That of course is the wrong tradeoff (it is a lot of difficult target dependent work to do the proper zero cost solution, and we are working on that now). 2. If your compiler *does* generate nice trace backs on unhandled exceptions, then you will undermine it by this approach. In particular, when we get the feature put in of avoiding destroying the stack on an unhandled exception, then you will be able to breakpoint on an unhandled exception and get a nice detailed traceback from GDB (with all the arguments at each level etc). You will undermine this capability if you put exception handlers in every procedure. Note: if your program does not in general use Constraint_Error as a control flow mechanism, i.e. you do not have any exception handlers for Constraint_Error in your program, or when others handlers, then you can do something quite easily now which may be useful in some cases. Simply add code at __gnat_raise to check if the exception is constraint error, and if so, abort. \ Then you will get a core dump which you can examine at leisure using GDB.