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.36.93.134 with SMTP id w128mr1818816ita.22.1516046192292; Mon, 15 Jan 2018 11:56:32 -0800 (PST) X-Received: by 10.157.4.236 with SMTP id 99mr971414otm.10.1516046191548; Mon, 15 Jan 2018 11:56:31 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer03.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no1835489ita.0!news-out.google.com!b73ni15903ita.0!nntp.google.com!w142no1835488ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 15 Jan 2018 11:56:31 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.39; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.39 References: <4ff1db1f-cf2e-4683-9882-da9a907d07b0@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <37cfde58-d7b5-416b-85c4-927c85864a16@googlegroups.com> Subject: Re: ADA.STRINGS.INDEX_ERROR : a-strunb.adb:782 From: Anh Vo Injection-Date: Mon, 15 Jan 2018 19:56:32 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2711 X-Received-Body-CRC: 2994832852 Xref: reader02.eternal-september.org comp.lang.ada:49930 Date: 2018-01-15T11:56:31-08:00 List-Id: On Monday, January 15, 2018 at 9:48:12 AM UTC-8, Dmitry A. Kazakov wrote: > On 2018-01-15 18:22, Anh Vo wrote: > > On Monday, January 15, 2018 at 12:29:41 AM UTC-8, Dmitry A. Kazakov wrote: > >> On 15/01/2018 02:18, Mehdi Saada wrote: > >>> This if statement exactly, seems to raise > >>> "ADA.STRINGS.INDEX_ERROR : a-strunb.adb:782"(No indication of line, so I can't know more). > >> > >> There is a list of funny numbers following the exception message. Pass > >> that list to > >> > >> addr2line --exe= > >> > >> That will give you the stack trace. > > > > It is even better to use GNAT addition to print out full stack trace as shown in the snippet. > > > > -- ... > > > > exception > > > > when Err : others => > > > > Text_Io.Put_Line ("Houston we have a problem: " & > > Exceptions.Exception_Information (Err)); > > Text_Io.Put_Line ("Traceback => " & GNAT.Traceback.Symbolic.Symbolic_Traceback(Err)); > > end [Ada Unit Name]; > > Even better to make AdaCore make this the default behavior when dealing > with unhandled exception. >> At least for me, a debugger is never needed. I consider it a tremendous improvement. > with unhandled exception. However considering that it took 20 years or > so to stop disabling integer overflow checks by default... It was that long. It is late still better than never :-). If it was me, I would do it in a day. Anh Vo