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.176.1.239 with SMTP id 102mr30661572ual.7.1469721616132; Thu, 28 Jul 2016 09:00:16 -0700 (PDT) X-Received: by 10.157.40.148 with SMTP id s20mr2324555ota.6.1469721616065; Thu, 28 Jul 2016 09:00:16 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!c52no5538368qte.1!news-out.google.com!d130ni17308ith.0!nntp.google.com!f6no5449360ith.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 28 Jul 2016 09:00:15 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:1205:c68c:9d90:71c4:f16e:f5f8:57c7; posting-account=Pm0FhgoAAAAiPscNT3etSZ15tHNZGXm_ NNTP-Posting-Host: 2a02:1205:c68c:9d90:71c4:f16e:f5f8:57c7 References: <3e02dbb0-69e3-429b-b8c5-d4762dbeb187@googlegroups.com> <66240de6-d3a8-458d-9eb9-1214f790831c@googlegroups.com> <22f2e37f-dc90-42ce-a6d3-42f0a471c4d6@googlegroups.com> <6178bf6c-6125-43b2-86c4-aeb08be48442@googlegroups.com> <273d77a5-55a6-4de6-abbe-93bb61ecfdc3@googlegroups.com> <4bd0a4ff-8262-41ee-bb5c-23672206a59a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8a97f7ff-7fda-480b-9f6e-68a4f2995b83@googlegroups.com> Subject: Re: Exception traceback when using TDM-GCC 5.1.0-3 From: ahlan.marriott@gmail.com Injection-Date: Thu, 28 Jul 2016 16:00:16 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:31201 Date: 2016-07-28T09:00:15-07:00 List-Id: On Thursday, 28 July 2016 17:44:32 UTC+2, Anh Vo wrote: > On Thursday, July 28, 2016 at 7:48:17 AM UTC-7, Anh Vo wrote: > > On Wednesday, July 27, 2016 at 11:07:02 PM UTC-7, ahlan.m...@gmail.com wrote: > > > > > > > > The exception is captured captured and handled in the exception handler. In addition, the traceback information is extracted as shown below. > > > > > > > > --... > > > > exception > > > > when Error : others => > > > > Put_Line (GNAT.Traceback.Symbolic.Symbolic_Traceback(Error)); > > > > --... > > > > > > Dear Anh, > > > > > > Yes this is how I catch exceptions and display them symbolically. > > > My current problem is that although I get some kind of traceback, it isn't complete. > > > I only get two of the expected eight traceback addresses. > > > The two I do get have very high addresses and it seems normal that these > > > cannot be resolved symbolically - hence they are displayed as "??" by both > > > Gnat.Traceback.Symbolic.Symbolic_Traceback and addr2line > > > > Try Simon's code with my modification shown below to see what I get complete traceback. By the way, it work on my PC. > > > > with Ada.Exceptions; use Ada.Exceptions; > > with Ada.Text_Io; use Ada.Text_Io; > > with GNAT.Traceback.Symbolic; > > procedure CE is > > procedure Raiser (N : Positive) is > > begin > > Raiser (N - 1); > > end Raiser; > > begin > > Raiser (5); > > exception > > when Error : others => > > Put_Line ("Houston we have a problem: " & Exception_Information(Error)); > > Put_Line (GNAT.Traceback.Symbolic.Symbolic_Traceback(Error)); > > end Ce; > > > > AV > > Sorry, what I meant was "Try Simon's code with my modification shown below to see if you get complete traceback. By the way, it worked on my PC." Dear Anh, Yes I appreciate that.. This is what I always try to do - and it works with GPL but not with TDM. But then nor does Addr2line so something is not quite right. MfG Ahlan