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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,f5ce49ceb519648b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: addr2line i mingw gcc 4.4.0 References: <86f46e08-56e0-4cc1-89be-93af2e7cad31@q37g2000vbi.googlegroups.com> <550a535e-eef9-4317-ac38-6ae915df6eed@r16g2000vbn.googlegroups.com> From: Stephen Leake Date: Sat, 27 Jun 2009 07:28:32 -0400 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:4ECdGORG8PaWZ0y7r/Tn3jAZYPA= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 9e1514a460265e9cadf9d26980 Xref: g2news2.google.com comp.lang.ada:6663 Date: 2009-06-27T07:28:32-04:00 List-Id: Ludovic Brenta writes: > Bj�rn Lundin wrote on comp.lang.ada: >> On 26 Juni, 22:56, sjw wrote: >> >> >> Looking in the ACT versions, the file is there, along with other >> >> lib?.a >> > Could you just copy from there? >> >> Should perhaps mentioned that I already tried that. Links OK but gives >> Program_Error at runtime, >> some Access_Violation thingy >> Also, I would prefer to have it from the gcc I'm using > > libaddr2line.a is an invention from AdaCore several years ago; it is a > patch against the program "addr2line" in certain versions of binutils, > not GCC. I am not aware of any binary distribution of it apart from > AdaCore's own. In Debian, I've patched GCC so that it supports > symbolic tracebacks by calling addr2line in an external process rather > than using libaddr2line in-process. An early version of this patch > was in the Ada for Linux Team distribution by J�rgen Pfeiffer for Red > Hat Linux 6 (in 1999). > > So, I think you can have symbolic tracebacks in mingw in one of two > ways: patch binutils to build libaddr2line.a then link libgnat against > it; or patch libgnat to use the same method as on Debian. A third alternative is to output numeric traceback from the failing program, and then use addr2line (the program) to get the symbolic traceback in a separate manual step. I use this approach. It reduces the amount of output significantly; there are many times that a traceback is generated by I don't want to peruse it. Ludovic's approach simply automates this. -- -- Stephe