public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Error while mapping shared library sections
@ 2011-10-27 15:45 johnmb
  2011-10-27 16:17 ` Joel Brobecker
  2011-10-27 17:00 ` Pedro Alves
  0 siblings, 2 replies; 5+ messages in thread
From: johnmb @ 2011-10-27 15:45 UTC (permalink / raw)
  To: gdb


I am debugging remotely and found that the performance of the link was quite
insufficient to use KDevelop - not unreasonable. So I am going back to using
GDB directly; this works when debugging locally but I am having problems
trying to debug remotely.

To start my debug session I first run a script containing the following :-

ruser=root@192.168.0.20
ssh ${ruser} 'gdbserver :2001 /home/programs/track'

This gives the expected listening on port 2001 message.  then I type the
following in another terminal window:-

gdb track --command debug/fsf_gdb_remote

The script fsf_gdb_remote contains the following:- 

set args -s 3 -i 1 -w /home/john/programs/
target remote 192.168.0.20:2001

Here is the following conversation in gdb:-

(gdb) b main
Breakpoint 1 at 0x804febd: file /home/john/kas_master/trunk/src/main.cc,
line 117.
(gdb) c
Continuing.
Error while mapping shared library sections:
/lib/libfsfutils.so: No such file or directory.
Error while mapping shared library sections:
/lib/libstdc++.so.6: No such file or directory.
Error while mapping shared library sections:
/lib/tls/libm.so.6: No such file or directory.
Error while mapping shared library sections:
/lib/tls/libc.so.6: No such file or directory.
Error while mapping shared library sections:
/lib/tls/libdl.so.2: No such file or directory.
Error while mapping shared library sections:
/lib/libz.so.1: No such file or directory.
Error while mapping shared library sections:
/lib/libgmodule-2.0.so.0: No such file or directory.
Error while mapping shared library sections:
/lib/libpcre.so.3: No such file or directory.

Breakpoint 1, main (argc=1, argv=0xbfbd2994) at
/home/john/kas_master/trunk/src/main.cc:117
117         int la=-1;  //  Language
(gdb)  


All the libraries are at the locations in the remote target as given in the
error messages so I don't
understand why this is happening.  I did read in several google located
accounts that this is fixed by
upgrading gdb to version 6.1; however I am using version 6.8 so it can't be
that.

Any ideas would be most gratefully accepted.



-- 
View this message in context: http://old.nabble.com/Error-while-mapping-shared-library-sections-tp32732200p32732200.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error while mapping shared library sections
  2011-10-27 15:45 Error while mapping shared library sections johnmb
@ 2011-10-27 16:17 ` Joel Brobecker
  2011-10-27 17:00 ` Pedro Alves
  1 sibling, 0 replies; 5+ messages in thread
From: Joel Brobecker @ 2011-10-27 16:17 UTC (permalink / raw)
  To: johnmb; +Cc: gdb

> All the libraries are at the locations in the remote target as given
> in the error messages so I don't understand why this is happening.  I
> did read in several google located accounts that this is fixed by
> upgrading gdb to version 6.1; however I am using version 6.8 so it
> can't be that.

All the libraries should be available on the host as well, so that GDB
can read the symbols from them.

Exerpt from the GDB Manual:

    20.3.2 Connecting to gdbserver
    
    Run gdb on the host system.
    
    First make sure you have the necessary symbol files. Load symbols
    for your application using the file command before you connect. Use
    set sysroot to locate target libraries (unless your gdb was compiled
    with the correct sysroot using --with-sysroot). 

-- 
Joel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error while mapping shared library sections
  2011-10-27 15:45 Error while mapping shared library sections johnmb
  2011-10-27 16:17 ` Joel Brobecker
@ 2011-10-27 17:00 ` Pedro Alves
  1 sibling, 0 replies; 5+ messages in thread
From: Pedro Alves @ 2011-10-27 17:00 UTC (permalink / raw)
  To: gdb; +Cc: johnmb

On Thursday 27 October 2011 16:23:56, johnmb wrote:

> All the libraries are at the locations in the remote target as given in the
> error messages so I don't
> understand why this is happening.  

Those files don't exist on the _host_ (where gdb is running).

> Any ideas would be most gratefully accepted.

You need a copy of the target's shared libraries on the host,
and point GDB at them.  See "set sysroot" in the manual.

-- 
Pedro Alves

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error while mapping shared library sections
  2008-04-15  8:46 spas
@ 2008-04-15 15:06 ` Daniel Jacobowitz
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2008-04-15 15:06 UTC (permalink / raw)
  To: spas; +Cc: gdb

On Mon, Apr 14, 2008 at 11:54:20PM -0700, spas wrote:
> 
> Hi all,
> 
>     I am doing remote debugging.  host=intel  target = powerpc 
> I am facing an error which is given below:
> 
> #warning: .dynamic section for "/lib/libc.so.6" is not at the expected
> address (wrong library or version #mismatch?)

Please read the manual section on "set sysroot".

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Error while mapping shared library sections
@ 2008-04-15  8:46 spas
  2008-04-15 15:06 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: spas @ 2008-04-15  8:46 UTC (permalink / raw)
  To: gdb


Hi all,

    I am doing remote debugging.  host=intel  target = powerpc 
I am facing an error which is given below:

#warning: .dynamic section for "/lib/libc.so.6" is not at the expected
address (wrong library or version #mismatch?)
#Error while mapping shared library sections:
#/lib/ld.so.1: No such file or directory.

on continuning further
#Program exited with code 03.

 please get me an way to overcome this error
-- 
View this message in context: http://www.nabble.com/Error-while-mapping-shared-library-sections-tp16696198p16696198.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-10-27 16:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-27 15:45 Error while mapping shared library sections johnmb
2011-10-27 16:17 ` Joel Brobecker
2011-10-27 17:00 ` Pedro Alves
  -- strict thread matches above, loose matches on Subject: below --
2008-04-15  8:46 spas
2008-04-15 15:06 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).