This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cross-compiling GDB/GDBSERVER


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 –target=powerpc-linux –enable-sim-powerpc \
–prefix=path/to/the/installation/of/toolchain

make
make install

Compilation went smoothly. Then, I compiled gdbserver:

cd ./gdb/gdbserver

./configure –host=powerpc-linux –prefix=path/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 address
warning: .dynamic section for "/lib/libm.so.6" is not at the expected address
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 ()


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]