Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Itzhak Ben-Akiva" <Itzhak.Ben-Akiva@computer.org>
To: gdb@sourceware.org
Subject: Cross-compiling GDB/GDBSERVER
Date: Tue, 16 Jan 2007 08:15:00 -0000	[thread overview]
Message-ID: <f6df51f00701160015y5dd7153fh56f818fb8e33b74e@mail.gmail.com> (raw)

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 ()


             reply	other threads:[~2007-01-16  8:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-16  8:15 Itzhak Ben-Akiva [this message]
2007-01-16 16:51 ` Daniel Jacobowitz
2007-01-16 19:21   ` Itzhak Ben-Akiva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f6df51f00701160015y5dd7153fh56f818fb8e33b74e@mail.gmail.com \
    --to=itzhak.ben-akiva@computer.org \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox