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,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,50ad4ada98045ba X-Google-Attributes: gid103376,public From: Corey Ashford Subject: Re: A small Ada success story Date: 1999/03/18 Message-ID: <36F0A77F.B0151962@rocketmail.com>#1/1 X-Deja-AN: 456030424 Content-Transfer-Encoding: 7bit References: <119fb4e248%hubersn@lcs.wn.bawue.de> <36efef1c.3265725@news.pacbell.net> <7cp9cp$743$1@nnrp1.dejanews.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Rational Software Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-03-18T00:00:00+00:00 List-Id: dennison@telepath.com wrote: > > In article <36efef1c.3265725@news.pacbell.net>, > tmoran@bix.com (Tom Moran) wrote: > > I well remember one early demo where the program got a > > Constraint_Error at such and such a line number. Within a few minutes > > I had it explained, fixed, recompiled, and was re-running the demo. > > The client was impressed. In C there would have been no error, just > > bad data in the database. > > I sure wish more compiler vendors made this information (line number of an > exception occurrence) available without using a debugger. > Shameless plug: Rational Apex 3.0.0b provides something that's better in some ways. There's a set of stack trace utilities that allows you to get a complete PC stack trace as well as the values of the machine registers when the exception was raised. This information can be dumped to a file in ASCII and forwarded to whomever produced the application. Even better, if one exception was raised and then translated to another exception (i.e. a different exception was raised) from within the handler, the stack trace will show the entire chain of exceptions that led to the final exception which was unhandled. There are some other nice features as well, such as being able to obtain a stack trace from arbitrary execution points in an application. Currently, it doesn't have the capability of generating a file name and line number at run time, but end-users of applications usually don't care to see that kind of information anyway. You can rig your application to automatically dump the stack trace to the file. When the customer calls and says, "hey! this stupid thing crashed with an unhandled exception!" you calm them down and then ask them to send you the small dump file via email. You then read this file into the debugger and it will show you the symbolic stack trace where the program crashed (including line numbers, etc.) Or you can chase down the line numbers by hand using the PC's from the dump file. Alternatively, you can rig the application to generate a core dump image when an unhandled exception occurs. This gives you far more debugging information at the expense of making it more difficult to transmit the dump file to the developer. - Corey