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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d188753fef109ace X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-02 13:10:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!deine.net!teaser.fr!enst!enst.fr!not-for-mail From: "David C. Hoos" Newsgroups: comp.lang.ada Subject: Re: problem with Gnat.Traceback.Symbolic on linux with Gnat 3.14p ? Date: Tue, 2 Apr 2002 15:08:54 -0600 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: <3ca2fb66$0$4997$626a54ce@news.free.fr> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1017781803 88123 137.194.161.2 (2 Apr 2002 21:10:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 2 Apr 2002 21:10:03 +0000 (UTC) Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Original-Cc: simon@pushface.org X-Original-Cc: n.brunot@cadwin.com Xref: archiver1.google.com comp.lang.ada:22017 Date: 2002-04-02T15:08:54-06:00 There is no problem with symbolic traceback on Linux with GNAT-3-14p, in general. There is, however, a small problem with some recent Linux distributions -- e.g., RedHat 7.2. The problem is that there are two symbolic links /usr/gnat/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/rts-fsu/adalib/libbfd-2.9.5.0. 22.so and /usr/gnat/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/rts-native/adalib/libbfd-2.9.5 .0.22.so which link to /usr/lib/libbfd.so, which on RedHat 7.2 is a symbolic link to libbfd-2.11.90.0.8.so GNAT executables requiring symbolic traceback functionality that are built with GNAT-3.14p will not work with libbfd-2.11 -- they really require libbfd-2.9, but the above chain of symbolic links causes the executable to link to libbfd-2.11 Here are the steps I took to remedy the situation (for RedHat 7.2), doing so in such a way as to not disturb the environment for any executables requiring libbfd-2.11: 1. Copy libbfd-2.9.5.0.22 (e.g., from a RedHat 6.2 system) to /usr/gnat/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/ 2. Delete the symbolic links /usr/gnat/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/rts-fsu/adalib/libbfd-2.9.5.0. 22.so and /usr/gnat/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/rts-native/adalib/libbfd-2.9.5 .0.22.so 3. Replace those two links with links to ../../libbfd-2.9.5.0.22.so (This assumes you have already added /usr/gnat/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/adalib to /etc/ld.so.conf) 4. Execute the command ldconfig 5. In each main program source code file add the following pragma: pragma Linker_Options ("/usr/gnat/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/libbfd-2.9.5.0.22.so"); 6. Compile with a command like the following: gnatmake -i -g -bargs -E \ -cargs -gnatwl -funwind-tables -O3 -Wuninitialized -fstack-check For what it's worth, I also use florist, so I moved the floristlib directory to /usr/gnat/lib after building it. Here is a small test program that will verify that symbolic tracebacks work, following these instructions: with Ada.Text_IO; with GNAT.Traceback.Symbolic; procedure Test_Traceback is pragma Linker_Options ("/usr/gnat/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/libbfd-2.9.5.0.22.so"); File : Ada.Text_IO.File_Type; begin Ada.Text_IO.Open (File => File, Name => "abcdefghijklmnopqrstuvwxyz", Mode => Ada.Text_IO.In_File); exception when E: others => Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E) & ASCII.LF & "Symbolic call stack traceback locations:" & ASCII.LF & GNAT.Traceback.Symbolic.Symbolic_Traceback (E)); end Test_Traceback; I have been using gnat-3.14p since it became available on RedHat 6.2, and 7.2, as well as Mandrake 7.1, with some very substantial programs (one with 21 threads of execution) with excellent results. David Hoos ----- Original Message ----- From: "nicolas" Newsgroups: comp.lang.ada To: Sent: Thursday, March 28, 2002 5:17 AM Subject: problem with Gnat.Traceback.Symbolic on linux with Gnat 3.14p ? > Hello > I have problems with Gnat.Traceback.Symbolic on Linux RedHAT 7.2 and Gnat > 3.14p > > the command issued is > gnatmake -f -funwind-tables -g test_trace.adb -bargs -E > > I get ?? instead of unit names and line numbers > > Note that everything works fine with the same command and Gnat 3.14p for > Sparc > > Am I missing something obvious ? (other than Gnat 3.14p was not tested for > RedHAT 7.2, I know that ...) > > Thanks > > > > > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada >