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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Phil Newsgroups: comp.lang.ada Subject: Re: GNAT compiler versions and addr2line Date: Thu, 23 Aug 2018 18:00:20 -0000 (UTC) Organization: Green Pike Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Date: Thu, 23 Aug 2018 18:00:20 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="2319ace8300ccf6abab8d2e832db8f8b"; logging-data="13216"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19BofJPScMmI0nKig4oaIqT" User-Agent: tin/2.4.1-20161224 ("Daill") (UNIX) (Linux/4.9.0-7-amd64 (x86_64)) Cancel-Lock: sha1:mxRBpUqmYP0SCbe1E9K023y8muM= sha1:c9QPH4WSeAhsIvAFEyIQRiSN9UA= Xref: reader02.eternal-september.org comp.lang.ada:54232 Date: 2018-08-23T18:00:20+00:00 List-Id: Anh Vo wrote: > On Wednesday, August 22, 2018 at 11:21:37 AM UTC-7, Phil wrote: > > Alejandro R. Mosteo wrote: > > > I have seen the same up to current 7.3 FSF Ubuntu versions, and sti= ll=20 > > > haven't found a workaround :/ > >=20 > > Ah, at least it's not just me! > gnatmake -g foo.adb -bargs -E for the following modified code. You > will be pleasantly surprised that addr2line is not needed > explicitly. > with Gnat.Traceback.Symbolic; > [=E2=80=A6] > Put_Line (GNAT.Traceback.Symbolic.Symbolic_Traceback(Err)); > end Foo; Which compiler version, please? Ironically, I started looking at addr2line when symbolic traceback wasn't working (it had been my preferred method of dealing with exceptions). Digging in the adainclude directory, I eventually ended up looking at s-trasym.adb. The Debian FSF versions says -- This is the default implementation for platforms where the full capab= ility -- is not supported. It returns tracebacks as lists of hexadecimal addre= sses -- of the form "0x...". and the implementation simply writes out the hex addresses. The current AdaCore community version has -- Run-time symbolic traceback support for targets using DWARF debug dat= a and does work for symbolic traceback. So with the FSF versions, I'd still be using addr2line=E2=80=A6. Phil.