Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Frank van Eijkelenburg" <frank.van.eijkelenburg@technolution.nl>
To: <frank.van.eijkelenburg@technolution.nl>,
	"Gnu Debugger mailing list" <gdb@sources.redhat.com>
Subject: RE: loading shared library
Date: Mon, 27 Jan 2003 10:38:00 -0000	[thread overview]
Message-ID: <JJEILELDMJJENLCGJHOIMEFCCEAA.frank.van.eijkelenburg@technolution.nl> (raw)
In-Reply-To: <JJEILELDMJJENLCGJHOIMEFBCEAA.frank.van.eijkelenburg@technolution.nl>

> Hi all,
>
> I've a linux machine with RedHat installed with linux kernel
> 2.4.7. GDB 5.3
> is running. I crosscompiled the gdbserver for an ARM platform (with linux
> 2.4.16-rmk2). when I try to debug a simple multithreaded program, I get an
> error when loading the shared libraries:
>
> (gdb) info sharedlibrary
> From        To          Syms Read   Shared Object Library
> 0x40023020  0x4002c35c  No          /lib/libpthread.so.0
> 0x40054400  0x401563d0  No          /lib/libc.so.6
> 0x40001e50  0x40012e80  No          /lib/ld-linux.so.2
> (gdb) sharedlibrary
> Reading symbols from /lib/libpthread.so.0...done.
> Ignoring packet error, continuing...
> Loaded symbols for /lib/libpthread.so.0
> Reading symbols from /lib/libc.so.6...done.
> Error while reading shared library symbols:
> putpkt: write failed: Broken pipe.
> Reading symbols from /lib/ld-linux.so.2...done.
> Error while reading shared library symbols:
> putpkt: write failed: Broken pipe.
> putpkt: write failed: Broken pipe.
> (gdb)
>
> At the target side, I've a segmentation fault. The simple program
> is linked
> against an unstripped libpthread. This library exists at the target. The
> only possible problem in my opinion, is that gdbserver is linked against
> libthread_db which itself is compiled against libc 2.2.4 while
> the target is
> working with libc 2.1.3. Could this be a problem, or is it something else
> what causes this behaviour???
>
> Thanx,
> Frank

I found out that only libpthread is giving problems (I can load the other
two libraries without any problem). When I rename the libpthread library (in
/lib) at the HOST, gdb is giving the following error message:

(gdb) info sharedlibrary
Error while mapping shared library sections:
/lib/libpthread.so.0: No such file or directory.
From        To          Syms Read   Shared Object Library
                        No          /lib/libpthread.so.0
0x40054400  0x401563d0  No          /lib/libc.so.6
0x40001e50  0x40012e80  No          /lib/ld-linux.so.2
(gdb) sharedlibrary
Error while reading shared library symbols:
/lib/libpthread.so.0: No such file or directory.
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
(gdb)

I don't understand why gdb tries to load a library from the host
(/lib/libpthread.so.0), while it needs the crosscompiled library from the
target. Or do I misunderstand something?

Frank


  reply	other threads:[~2003-01-27 10:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-27  9:56 Frank van Eijkelenburg
2003-01-27 10:38 ` Frank van Eijkelenburg [this message]
2003-01-27 16:05   ` Kevin Buettner
2003-01-31  9:55     ` Frank van Eijkelenburg
2003-01-31 10:39       ` Kevin Buettner
2003-01-31 10:53         ` Frank van Eijkelenburg

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=JJEILELDMJJENLCGJHOIMEFCCEAA.frank.van.eijkelenburg@technolution.nl \
    --to=frank.van.eijkelenburg@technolution.nl \
    --cc=gdb@sources.redhat.com \
    /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