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=0.6 required=5.0 tests=BAYES_05,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4d683283fc9bfdf1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-12 12:36:10 PST Newsgroups: comp.lang.ada Path: sparky!uunet!gatekeeper.us.oracle.com!decwrl!ads.com!saturn!bhanafee From: bhanafee@picasso.ads.com (Brian Hanafee) Subject: Re: Exception handler question In-Reply-To: tim@trident.datasys.swri.edu's message of 11 Mar 93 20:17:34 GMT Message-ID: Sender: usenet@ads.com (USENET News) Organization: Advanced Decision Systems, Mountain View, CA 94043, +1 (415) 960-7300 References: <318@trident.datasys.swri.edu> Date: Fri, 12 Mar 1993 20:01:05 GMT Date: 1993-03-12T20:01:05+00:00 List-Id: In article <318@trident.datasys.swri.edu> tim@trident.datasys.swri.edu (Timothy J. Barton) writes: >Please help me in my ignorance of Ada exception handlers. That's not (quite) where the problem lies. > I am using Sun >Ada and am trying to trap the usage of an out of range value being passed >to another program unit. I have an exception handler with >"when CONSTRAINT_ERROR" and "when others", but the exception handler is not >getting called. When I run the program in the Sun Ada debugger, I get the >message: > > "Illegal instruction" [4] Software trap: range check > >Program execution is halted, I can't single step any further. In other >cases where I trap an exception, a single step would take me to the >exception hanlder source lines. This is the result of an incompatibility between the SunAda compiler and its debugger. The generated code is set up to send signal 4 when the exception is raised, and that is supposed to take you to the exception handler. The problem is that the debugger intercepts all of the signals. The workaround is relatively simple, though. When you get the prompt, type "set signal 4 gx". This tells the debugger to pass signal 4 on to your program and continue execution. -- Brian Hanafee Advanced Decision Systems bhanafee@ads.com 1500 Plymouth Street (415) 960-7300 Mountain View, CA 94043-1230