Received: (at submit) by bugs.debian.org; 17 Feb 2000 18:23:55 +0000 Received: (qmail 21509 invoked from network); 17 Feb 2000 18:23:54 -0000 Received: from cbl-jehamby.hs.earthlink.net (HELO buk.buk.org) (mail@207.217.174.211) by master.debian.org with SMTP; 17 Feb 2000 18:23:54 -0000 Received: from jehamby (helo=localhost) by buk.buk.org with local-smtp (Exim 3.12 #1 (Debian)) id 12LVad-0005hL-00 for ; Thu, 17 Feb 2000 10:23:47 -0800 Date: Thu, 17 Feb 2000 10:23:47 -0800 (PST) From: Jake Hamby X-Sender: jehamby@buk.buk.org To: submit@bugs.debian.org Subject: gnat library compiled with bad path to sources Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Jake Hamby Package: gnat Version: 3.12p-4 When I try to debug a program compiled with gnat, either by calling gdb directly, or with the gnatmem leak checker, I get errors that the debugger can't find the location of any Ada library source files. For example, for this simple "hello, world" program: with Text_IO; use Text_IO; procedure Hello is begin Put_Line("Hello, world!"); end Hello; $ gnatmake -g hello .. compiling .. $ gdb hello GNU gdb 19990928 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... (gdb) break hello.adb:6 Breakpoint 1 at 0x8048f93: file hello.adb, line 6. (gdb) run Starting program: /home/jehamby/Code/hello Breakpoint 1, _ada_hello () at hello.adb:6 6 Put_Line("Hello, world!"); (gdb) step ada__text_io__put_line__2 (item={P_ARRAY = 0x8049eac, P_BOUNDS = 0x8049ebc}) at a-textio.adb:1089 1089 a-textio.adb: No such file or directory. (gdb) A similar error occurs with gnatmem, but that appears to be a different problem which I'll file in a separate bug report: $ gnatmem hello 443 a-except.adb: No such file or directory. ### incorrect user program termination detected. following data may not be meaningful Global information ------------------ Total number of allocations : 0 Total number of deallocations : 0 Final Water Mark (non freed mem) : 0 Bytes High Water Mark : 0 Bytes By running strace, I was able to determine that GDB is looking for the files in /home/sam/Debian/gnat/gnat-3.12p/ada/rts/ instead of /usr/lib/gcc-lib/i486-linux/2.8.1/adainclude/ As an ugly workaround, I can create a symlink from /usr/lib/gcc-lib/i486-linux/2.8.1/adainclude/ into /home/sam/Debian/gnat/gnat-3.12p/ada/rts/ so GDB can find the files, but clearly, the correct solution is to build GNAT in such a way that libgnat.so contains the correct locations for its source files. I'm using Debian 2.3 (woody), kernel version 2.2.14, libc6 version 2.1.3-2, and gdb version 4.18.19990928-1. -Jake