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!mx02.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Re-write a file in Ada Date: Thu, 21 Jan 2016 12:26:57 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <77e47c8b-7dcc-4e86-8f89-1f348cdf08dd@googlegroups.com> <888e0bed-6d19-4ab6-84e7-67dd2f227407@googlegroups.com> <73c2bbe1-15fc-4c29-b500-fb0a637abd91@googlegroups.com> <87175c10-f8fc-4550-856c-6577f1e4acae@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 21 Jan 2016 12:26:57 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="da745e888d4a5182b5fda6212bbb0a63"; logging-data="6174"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+tmGSnWa2W+od/Ok4v33InvZ27lqDVb8Y=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:ACPv76Km4BNYExRA4n8jSTAIdfY= Xref: news.eternal-september.org comp.lang.ada:29183 Date: 2016-01-21T12:26:57+00:00 List-Id: On Tue, 19 Jan 2016 08:52:02 -0800, gautier_niouzes wrote: > On Tuesday, January 19, 2016 at 1:27:22 PM UTC+1, Brian Drummond wrote: > >> Agreed. Traceback would be very helpful. > There is a way that doesn't need calling post-mortem addr2line: wrap > your main procedure with the TB_Wrap generic procedure below, by > instanciating the wrapper like this: > with TB_Wrap, To_BMP; > pragma Elaborate_All(TB_Wrap); > procedure TB_To_BMP is new TB_Wrap(To_BMP); Excellent! I'll play with this. Ready access to this sort of resource would make a beginning Ada programmer's life much easier. I'm sure most Ada experts (i.e. folks with much more experience than I have) either have no need of it, or have already rolled their own solution, or use tools that do it automagically. I've seen something equivalent in Dmitry's Simple Components but I've never tried extracted it as a stand-alone solution. So I've just used addr2line when I've needed to. -- Brian