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.237.54.135 with SMTP id f7mr29803998qtb.6.1469722573438; Thu, 28 Jul 2016 09:16:13 -0700 (PDT) X-Received: by 10.157.45.104 with SMTP id v95mr240395ota.13.1469722573391; Thu, 28 Jul 2016 09:16:13 -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!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!j37no5262402qta.0!news-out.google.com!d130ni17296ith.0!nntp.google.com!f6no5461852ith.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 28 Jul 2016 09:16:12 -0700 (PDT) In-Reply-To: <8a97f7ff-7fda-480b-9f6e-68a4f2995b83@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.37; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.37 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> <8a97f7ff-7fda-480b-9f6e-68a4f2995b83@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <26fc8fd2-f81b-45f6-a584-e8558239eae0@googlegroups.com> Subject: Re: Exception traceback when using TDM-GCC 5.1.0-3 From: Anh Vo Injection-Date: Thu, 28 Jul 2016 16:16:13 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:31203 Date: 2016-07-28T09:16:12-07:00 List-Id: On Thursday, July 28, 2016 at 9:00:16 AM UTC-7, ahlan.m...@gmail.com wrote: > 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.co= m wrote: > > > > > =20 > > > > > The exception is captured captured and handled in the exception h= andler. In addition, the traceback information is extracted as shown below. > > > > >=20 > > > > > --... > > > > > exception=20 > > > > > when Error : others =3D> =20 > > > > > Put_Line (GNAT.Traceback.Symbolic.Symbolic_Traceback(Error))= ; > > > > > --... > > > >=20 > > > > Dear Anh, > > > >=20 > > > > Yes this is how I catch exceptions and display them symbolically. > > > > My current problem is that although I get some kind of traceback, i= t 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 > > >=20 > > > Try Simon's code with my modification shown below to see what I get c= omplete traceback. By the way, it work on my PC. > > >=20 > > > 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 =3D> > > > Put_Line ("Houston we have a problem: " & Exception_Information= (Error)); > > > Put_Line (GNAT.Traceback.Symbolic.Symbolic_Traceback(Error)); > > > end Ce;=20 > > >=20 > > > AV > >=20 > > Sorry, what I meant was "Try Simon's code with my modification shown be= low to see if you get complete traceback. By the way, it worked on my PC." >=20 > Dear Anh, >=20 > 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. =20 I share your frustration since I was in a similar situation before. Thus, I= have a suggestion. Use a PC having no GNAT nor TDM-GCC installed before. I= nstall TDM-GCC and try it one more time. By the way, use command line "gnat= make -f -g ce.adb -bargs -E" first. If you do not have another PC, uninstal= l GNAT-GPL and TDM-GCC completely before reinstall TDM-GCC. Anh Vo