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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1a4156f047b063f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!t13g2000vbo.googlegroups.com!not-for-mail From: Mark Lorenzen Newsgroups: comp.lang.ada Subject: Re: Forcing Exception Handling Date: Tue, 1 Mar 2011 05:27:26 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <02901b13-da72-48ae-9cb3-bf1a10144c44@u3g2000vbe.googlegroups.com> <4d6c07c1$0$6885$9b4e6d93@newsspool2.arcor-online.net> <195bsgigtzacu$.13u18z09ptrtw$.dlg@40tude.net> <91988389-b17a-42cb-8f5b-9b1205604b55@y3g2000vbh.googlegroups.com> NNTP-Posting-Host: 193.163.1.105 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1298986046 30780 127.0.0.1 (1 Mar 2011 13:27:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 1 Mar 2011 13:27:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: t13g2000vbo.googlegroups.com; posting-host=193.163.1.105; posting-account=Srm5lQoAAAAEMX9rv2ilEKR6FDPapmSq User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; da; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:18652 Date: 2011-03-01T05:27:26-08:00 List-Id: On 1 Mar., 10:34, iloAda wrote: > Mmmmmm...That's what I was fearing!! > Actually the idea behind my question was that I'm working on a real > time system, and as u know, we can't afford to a let a real time > system crash because of an unhandled exception. Since I use some other If you cannot afford a crash, then you should make sure that exceptions do not occur in the first place, i.e. use SPARK as others have mentioned. > exception > =A0When others =3D> > =A0 =A0 =A0-- =A0Do something that will allow the system to keep on runni= ng > > have u guys done something like that before? I'm currently working on a system where we can afford that the program crashes, but we will use the above "when others" construct to catch all possible exceptions (pre-defined and user-defined) on the outer- most level and then simply dump the exception trace to memory (a bit like Dmitry's example) for later (off-line) analysis after a reboot that doesn't whipe that specific part of memory. We will use the addr2line utility to translate the addresses of the exception trace into file names and line numbers. You must compile your executable *with* debug information in order to perform the (off- line) address translation. If you don't/can't run the executable with debug information (e.g. due to size constraints), then you can can strip the debug information from the file that you are executing but keep it in the executable used for off-line analysis, and the address translation will still work correct. I hope that made sense... Regards, - Mark L