From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24622 invoked by alias); 16 Jan 2007 08:15:40 -0000 Received: (qmail 24599 invoked by uid 22791); 16 Jan 2007 08:15:39 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.184) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 16 Jan 2007 08:15:32 +0000 Received: by nf-out-0910.google.com with SMTP id n28so2145903nfc for ; Tue, 16 Jan 2007 00:15:28 -0800 (PST) Received: by 10.82.120.14 with SMTP id s14mr816951buc.1168935327988; Tue, 16 Jan 2007 00:15:27 -0800 (PST) Received: by 10.82.173.15 with HTTP; Tue, 16 Jan 2007 00:15:27 -0800 (PST) Message-ID: Date: Tue, 16 Jan 2007 08:15:00 -0000 From: "Itzhak Ben-Akiva" To: gdb@sourceware.org Subject: Cross-compiling GDB/GDBSERVER MIME-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Google-Sender-Auth: f8e4bbd6f9262813 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00257.txt.bz2 Hi all, I'm having some problems with a cross-compiled gdb/gdbserver. I have searched the Net to find some help, but nothing that I have not already tried. Include some mails exchange between Daniel Jacobowitz and Dan Kegel. The facts are as follows: I built my toolchain for PowerPC 440EP with Kegel's crosstool. The toolchain works properly. I'm using it for one year already. Two days ago I compiled gdb/gdbserver in the following way: cd gdb-6.6 ./configure =96target=3Dpowerpc-linux =96enable-sim-powerpc \ =96prefix=3Dpath/to/the/installation/of/toolchain make make install Compilation went smoothly. Then, I compiled gdbserver: cd ./gdb/gdbserver ./configure =96host=3Dpowerpc-linux =96prefix=3Dpath/to/the/installation/of= /toolchain make make install Compilation went smoothly without any warnings. However, when I try to connect to the gdbserver, I get the message I post below. gdb is trying to find the libraries in the wrong places instead of the right one, i.e., the toolchain build directory. What am I missing in the compilation? Should I set CFLAGS and LD_FLAGS to the path of the toolchain build directory? Many thanks in advance, Itzhak (gdb) target remote 172.20.2.156:9898 Remote debugging using 172.20.2.156:9898 warning: Remote failure reply: E01 0x30010308 in ?? () warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. (gdb) b main Breakpoint 1 at 0x1000378c (gdb) c Continuing. warning: .dynamic section for "/lib/libpthread.so.0" is not at the expected address warning: .dynamic section for "/lib/libc.so.6" is not at the expected addre= ss warning: .dynamic section for "/lib/libm.so.6" is not at the expected addre= ss Error while mapping shared library sections: /usr/lib/gcc/powerpc-unknown-linux-gnu/3.4.4/libstdc++.so.6: No such file or directory. Error while mapping shared library sections: /usr/lib/gcc/powerpc-unknown-linux-gnu/3.4.4/libgcc_s.so.1: No such file or directory. Error while mapping shared library sections: /lib/ld.so.1: No such file or directory. Error while reading shared library symbols: /usr/lib/gcc/powerpc-unknown-linux-gnu/3.4.4/libstdc++.so.6: No such file or directory. Error while reading shared library symbols: /usr/lib/gcc/powerpc-unknown-linux-gnu/3.4.4/libgcc_s.so.1: No such file or directory. Error while reading shared library symbols: /lib/ld.so.1: No such file or directory. Program received signal SIGSEGV, Segmentation fault. 0x10001a70 in _start ()