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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.70.135.10 with SMTP id po10mr60337889pdb.2.1435251313765; Thu, 25 Jun 2015 09:55:13 -0700 (PDT) X-Received: by 10.140.105.10 with SMTP id b10mr699644qgf.26.1435251313508; Thu, 25 Jun 2015 09:55:13 -0700 (PDT) Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!h15no8520017igd.0!news-out.google.com!k20ni3265qgd.0!nntp.google.com!q107no3289940qgd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 25 Jun 2015 09:55:13 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.36; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.36 References: <9894cde7-2cf8-4060-be65-857812ad7b09@googlegroups.com> <17436268-aceb-461f-bdcf-eee8436cd0e6@googlegroups.com> <86y4jaqzdx.fsf@stephe-leake.org> <01ac6d30-fa93-4868-aa31-3dbec93e9a21@googlegroups.com> <9b539536-f385-434d-ad0c-a48e8877e23b@googlegroups.com> <99d819fa-148e-4e20-b7e1-c509b16ca093@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <535fb521-1411-4a21-b3ef-76f4fb5a8246@googlegroups.com> Subject: Re: What do you think about this? From: Anh Vo Injection-Date: Thu, 25 Jun 2015 16:55:13 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.giganews.com comp.lang.ada:193780 Date: 2015-06-25T09:55:13-07:00 List-Id: On Thursday, June 25, 2015 at 12:29:45 AM UTC-7, Simon Wright wrote: > Laurent writes: > > > Houston we have a problem: Exception name: SYSTEM.ASSERTIONS.ASSERT_FAILURE > > Message: failed precondition from common_defs_bci.ads:19 > > Load address: 0x1070dc000 > > Call stack traceback locations: > > 0x107111931 0x1070e35f1 0x1070ddf8c 0x1070de763 0x1070de147 0x1070df063 > > > > 0x0000000107111931 > > 0x00000001070E35F1 > > 0x00000001070DDF8C > > 0x00000001070DE763 > > 0x00000001070DE147 > > 0x00000001070DF063 > > > > I can interpret the 3 first lines. For the rest I will ask my cat(s). > > GNAT.Traceback.Symbolic isn't useful on Mac OS X; all it does is report > the absolute addresses of the stack trace without interpretation. The > fact it does so on multiple lines addes to the inconvenience. > > My little example (written for another purpose) is: > > with Ada.Exceptions; > with Ada.Text_IO; use Ada.Text_IO; > procedure Raiser is > begin > begin > raise Constraint_Error; > exception > when E : Constraint_Error => > Put_Line ("CE raised."); > Put_Line (Ada.Exceptions.Exception_Information (E)); > raise; > end; > end Raiser; > > and when I run it I get (GNAT GPL 201[4,5], FSF GCC) > > $ ./raiser > CE raised. > Exception name: CONSTRAINT_ERROR > Message: raiser.adb:6 explicit raise > Load address: 0x101819000 > Call stack traceback locations: > 0x10181a987 0x10181a925 > > > Execution terminated by unhandled exception > Exception name: CONSTRAINT_ERROR > Message: raiser.adb:6 explicit raise > Load address: 0x101819000 > Call stack traceback locations: > 0x10181a987 0x10181a925 > > The first set of messages is from Exception_Information, the last > because of dropping out of the main program. > > The linker, by default, generates position-independent executables > (protection against viruses); the Load address line is where we happened > to get loaded this time. > > To decode the stack traceback, use atos > > $ atos -d -o raiser -l 0x101819000 0x10181a987 0x10181a925 > got symbolicator for raiser, base address 100000000 > _ada_raiser (in raiser) (raiser.adb:6) > main (in raiser) (b~raiser.adb:197) What happens if you insert the below line before raise statement? Put_Line (Traceback.Symbolic.Symbolic_Traceback(Err));