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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,fea50f781bb229dc X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "(see below)" Newsgroups: comp.lang.ada Subject: Re: Symbolic tracebacks on Debian Date: Sun, 23 May 2010 19:35:08 +0100 Message-ID: References: <85f51aeb-cac9-4591-921a-a7f50c8ef142@a21g2000yqn.googlegroups.com> <1pup1z7a4f1pq$.of30sejrqe4m.dlg@40tude.net> <87hbmae33k.fsf@ludovic-brenta.org> <85j595F1lqU1@mid.individual.net> <87sk5navk6.fsf_-_@ludovic-brenta.org> <82bpc8s17m.fsf@stephe-leake.org> <82eih2rblr.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: individual.net ffPbksVmwJSyBoLZrxT9LgRA/bdLP4+W4DcUC5OQIUsb1PYeUW Cancel-Lock: sha1:kl2+cgL21io0JnYdNREAIGbHJuY= User-Agent: Microsoft-Entourage/12.23.0.091001 Thread-Topic: Symbolic tracebacks on Debian Thread-Index: Acr6pqtd1sujgEQ800K9yCdC7OQQxQ== Xref: g2news2.google.com comp.lang.ada:11903 Date: 2010-05-23T19:35:08+01:00 List-Id: On 23/05/2010 16:52, in article m2632evcn3.fsf@pushface.org, "Simon Wright" wrote: > Stephen Leake writes: > >> Simon Wright writes: >>> You need to call >>> >>> GNAT.Exception_Traces.Trace_On >>> (Kind => GNAT.Exception_Traces.Unhandled_Raise); >> >> I never do this. >> >>> from somewhere in your program and run gnatmake with -bargs -E. >> >> I only do this if I want symbolic traces from the running program, which >> I don't anymore. > > If you want _symbolic_ traces you add > > GNAT.Exception_Traces.Set_Trace_Decorator > (Decorator => GNAT.Traceback.Symbolic.Symbolic_Traceback'Access); > > Actually, there is a difference: this code > > with GNAT.Exception_Traces; > procedure T is > Foo, Bar : exception; > task T is > entry Start; > end T; > task body T is > begin > accept Start; > raise Bar; > end T; > begin > GNAT.Exception_Traces.Trace_On > (Kind => GNAT.Exception_Traces.Unhandled_Raise); > T.Start; > raise Foo; > end T; > > results in > > $ ./t > > Unhandled Exception raised > Exception name: T.FOO > Message: t.adb:16 > Call stack traceback locations: > 0x100001577 0x10000141b > task t_0000000100800E00 terminated by unhandled exception > Exception name: T.BAR > Message: t.adb:10 > Call stack traceback locations: > 0x100001742 0x10000aa82 0x7fff825fb8b4 > > whereas with the Trace_On call commented out, it generates > > $ ./t > > Execution terminated by unhandled exception > Exception name: T.FOO > Message: t.adb:16 > Call stack traceback locations: > 0x10000157d 0x10000142b > > so you get to see the unhandled exceptions in tasks too. Are these features enabled in your OS X port, Simon? -- Bill Findlay chez blueyonder.co.uk