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: Simon Wright Newsgroups: comp.lang.ada Subject: Re: ADA.STRINGS.INDEX_ERROR : a-strunb.adb:782 Date: Mon, 15 Jan 2018 10:49:18 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="bace45c2e433887fcd332d54126ebdc1"; logging-data="26841"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184GuW9+LLzn3sipTHysQoO+hzYDM3WfPM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:d+u25Nqs7uTGCAbezli98tnL86E= sha1:wgTT35GW30Oq8xXoWvFa1R+j0UM= Xref: reader02.eternal-september.org comp.lang.ada:49907 Date: 2018-01-15T10:49:18+00:00 List-Id: "Dmitry A. Kazakov" writes: > There is a list of funny numbers following the exception message. Pass > that list to > > addr2line --exe= > > That will give you the stack trace. You need to build with -g (debug info) and -bargs -E (-Es?) for this to work well. If you're on a Mac, you'd see something like (this is from a demo program of mine) $ ./raiser Execution of ./raiser terminated by unhandled exception raised PROGRAM_ERROR : raiser.adb:3 explicit raise Load address: 0x10cb10000 Call stack traceback locations: 0x10cb11163 0x10cb11104 and you get the traceback by $ atos -o raiser -l 0x10cb10000 0x10cb11163 0x10cb11104 _ada_raiser (in raiser) (raiser.adb:3) main (in raiser) (b~raiser.adb:158) where the -l part is the Load address - programs are loaded at random addresses to defeat some hacking vulnerabilities.