From: "xchen" <xchen@sunrisetelecom.com.cn>
To: <gdb@sourceware.org>
Subject: wrong lib address
Date: Thu, 30 Aug 2007 10:21:00 -0000 [thread overview]
Message-ID: <20070830102100.WQbGadkCZk085ZPtxkPJ5uiYo_s1mGMS-HRXWk4jmlI@z> (raw)
Hi
I use gdbserver to debug my program. The problem is gdb can't load
library file correctly.
Belowed is snapshot for my debug process. I think I have set the
right path for loading library file.
metrodev:/home/chenxi # ppc_8xx-ldd metro.elf
libpthread.so.0 =>
/opt/montavista/pro/devkit/ppc/8xx/target/lib/libpthread.so.0 (0xdead1000)
librt.so.1 =>
/opt/montavista/pro/devkit/ppc/8xx/target/lib/librt.so.1 (0xdead2000)
libstdc++.so.5 =>
/opt/montavista/pro/devkit/ppc/8xx/target/usr/lib/libstdc++.so.5
(0xdead3000)
libm.so.6 => /opt/montavista/pro/devkit/ppc/8xx/target/lib/libm.so.6
(0xdead4000)
libgcc_s.so.1 =>
/opt/montavista/pro/devkit/ppc/8xx/target/lib/libgcc_s.so.1 (0xdead5000)
libc.so.6 => /opt/montavista/pro/devkit/ppc/8xx/target/lib/libc.so.6
(0xdead6000)
/lib/ld.so.1 =>
/opt/montavista/pro/devkit/ppc/8xx/target/lib/ld.so.1 (0xdead7000)
metrodev:/home/chenxi/cpu_io_v106_af/cpu_v106_af/cpu_v/Debug # ppc-linux-gdb
metro.elf
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=ppc-linux"...
===========================================================
(gdb) set solib-absolute-prefix /opt/montavista/pro/devkit/ppc/8xx/target/
==============================================================
(gdb) target remote 192.168.70.99:1234
Remote debugging using 192.168.70.99:1234
_start () at ../sysdeps/powerpc/powerpc32/dl-start.S:33
33 ../sysdeps/powerpc/powerpc32/dl-start.S: No such file or directory.
in ../sysdeps/powerpc/powerpc32/dl-start.S
Current language: auto; currently asm
(gdb) b main
Breakpoint 1 at 0x1000a5cc: file ../working/src/root.cpp, line 232.
(gdb) list
28 in ../sysdeps/powerpc/powerpc32/dl-start.S
(gdb) continue
Continuing.
Error while mapping shared library sections:
/mnt/cf/shared/lib/libpthread.so.0: No such file or directory.
Error while mapping shared library sections:
/mnt/cf/shared/lib/librt.so.1: No such file or directory.
Error while mapping shared library sections:
/mnt/cf/shared/lib/libstdc++.so.5: No such file or directory.
Error while mapping shared library sections:
/mnt/cf/shared/lib/libm.so.6: No such file or directory.
Breakpoint 1, main (argc=2147483016, argv=0xfc32da4) at
../working/src/root.cpp:232
232 pthread_attr_init( &init_attr );
Current language: auto; currently c++
(gdb) info sharedlibrary
From To Syms Read Shared Object Library
0x30001f90 0x30013760 Yes
/opt/montavista/pro/devkit/ppc/8xx/target/lib/ld.so.1
No /mnt/cf/shared/lib/libpthread.so.0
No /mnt/cf/shared/lib/librt.so.1
No /mnt/cf/shared/lib/libstdc++.so.5
No /mnt/cf/shared/lib/libm.so.6
0x0fd7da40 0x0fd86f3c Yes
/opt/montavista/pro/devkit/ppc/8xx/target/lib/libgcc_s.so.1
0x0fc32ad0 0x0fd3a1fc Yes
/opt/montavista/pro/devkit/ppc/8xx/target/lib/libc.so.6
(gdb)
I don't know why the path changed to /mnt/cf/shared/lib, this is my target
lib path. Maybe I create the related dir can solve the problem, but I am
glad to know the essential reason and the related solution.
Thx,
Xi
next reply other threads:[~2007-08-30 10:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-30 10:21 xchen [this message]
[not found] <20070830102107.6A5A398153@nan.false.org>
2007-08-30 12:14 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
2007-08-30 10:21 xchen
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=20070830102100.WQbGadkCZk085ZPtxkPJ5uiYo_s1mGMS-HRXWk4jmlI@z \
--to=xchen@sunrisetelecom.com.cn \
--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