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!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Exception traceback when using TDM-GCC 5.1.0-3 Date: Sat, 23 Jul 2016 17:13:33 +0100 Organization: A noiseless patient Spider Message-ID: References: <3e02dbb0-69e3-429b-b8c5-d4762dbeb187@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="1cb8779fb08c1b31c8309afcb9b531dc"; logging-data="22172"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/RKjdyUqpaoPmfqsI1lRdBjNecwV1SJeI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:pcNemHaY1WXT1QApdtSjIJjeS6E= sha1:QcbpT2ZOfHsQpKfAPOZHgCx2nAA= Xref: news.eternal-september.org comp.lang.ada:31136 Date: 2016-07-23T17:13:33+01:00 List-Id: ahlan@marriott.org writes: > Our problem is that we don't get a traceback at all. > In AdaCore's GNAT the traceback is displayed by default in hex. > To convert that into a symbolic traceback we use Gnat.Traceback.Symbolic. > However this is not the problem. > The problem is that we don't get a traceback at all - ie the -E switch > doesn't seem to have the desired effect. Using 32-bit TDM GCC 5.1.0 (tdm-1) on Windows 7 with this: procedure CE is procedure Raiser (N : Positive) is begin Raiser (N - 1); end Raiser; begin Raiser (5); end CE; I get this: >ce Execution terminated by unhandled exception Exception name: CONSTRAINT_ERROR Message: ce.adb:4 range check failed Call stack traceback locations: 0x401533 0x401533 0x401533 0x40154b 0x4014e6 0x4010fb 0x77a73646 0x77a73619 and I can use the addr2line.exe that came with GNAT GPL 2014 (I just haven't got round to installing the 2016 release) to get this >addr2line.exe -e ce.exe 0x401533 0x401533 0x401533 0x40154b 0x4014e6 0x4010fb 0x77a73646 0x77a73619 C:\Users\Simon Wright/ce.adb:4 C:\Users\Simon Wright/ce.adb:4 C:\Users\Simon Wright/ce.adb:4 C:\Users\Simon Wright/ce.adb:7 C:/Users/Simon Wright/b~ce.adb:140 crt1.c:? ??:0 ??:0