From: Kunal Parmar <kunal.parmar@codito.com>
To: gdb@sources.redhat.com
Subject: shared library symbols not loaded automatically
Date: Wed, 12 Jul 2006 18:12:00 -0000 [thread overview]
Message-ID: <44B53A5D.7090505@codito.com> (raw)
Hello,
I am trying to debug a program which uses shared libraries.
My host is i386-linux and target is arm-linux.
While debugging, gdb shows me the shared libraries used by my program
but it does not load the symbols automatically (auto-solib-add is set).
I have to explicitly use the sharedlibrary command after which the shared
library symbols are read in.
Here is the GDB session -
> GNU gdb 6.3
> Copyright 2004 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=arm-linux"...
> (gdb) target remote 192.168.100.226:7777
> Remote debugging using 192.168.100.226:7777
> 0x40000b10 in ?? ()
> (gdb) b main
> Breakpoint 1 at 0x85f4: file foo.c, line 5.
> (gdb) c
> Continuing.
>
> Breakpoint 1, main () at foo.c:5
> 5 printf("%d\n", add(3,4));
> (gdb) info sharedlibrary
> From To Syms Read Shared Object Library
> 0x4001e66c 0x4001e810 No ./libadd.so
> 0x40027640 0x400277d0 No ./libsub.so
> 0x40045170 0x40122328 No /lib/libc.so.6
> 0x40157800 0x4015e3ec No /lib/libgcc_s.so.1
> 0x40000770 0x4001117f No /lib/ld-linux.so.2
> (gdb) show auto-solib-add
> Autoloading of shared library symbols is on.
> (gdb) sharedlibrary
> Reading symbols from /home/kunal/tmp/overflow/libadd.so...done.
> Loaded symbols for ./libadd.so
> Reading symbols from /home/kunal/tmp/overflow/libsub.so...done.
> Loaded symbols for ./libsub.so
> Reading symbols from /lib/libc.so.6...done.
> Loaded symbols for /lib/libc.so.6
> Reading symbols from /lib/libgcc_s.so.1...done.
> Loaded symbols for /lib/libgcc_s.so.1
> Reading symbols from /lib/ld-linux.so.2...done.
> Loaded symbols for /lib/ld-linux.so.2
> (gdb) info sharedlibrary
> From To Syms Read Shared Object Library
> 0x4001e66c 0x4001e810 Yes ./libadd.so
> 0x40027640 0x400277d0 Yes ./libsub.so
> 0x40045170 0x40122328 Yes /lib/libc.so.6
> 0x40157800 0x4015e3ec Yes /lib/libgcc_s.so.1
> 0x40000770 0x4001117f Yes /lib/ld-linux.so.2
> (gdb)
I want the shared library symbols to be read in automatically. Any help
will be appreciated.
Regards,
Kunal Parmar
next reply other threads:[~2006-07-12 18:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-12 18:12 Kunal Parmar [this message]
2006-07-12 18:15 ` Daniel Jacobowitz
2006-07-21 16:14 ` Kunal Parmar
2006-07-22 20:09 ` Daniel Jacobowitz
2006-07-22 21:07 ` Paul Koning
2006-07-22 23:17 ` Daniel Jacobowitz
2006-07-23 22:36 ` Kunal Parmar
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=44B53A5D.7090505@codito.com \
--to=kunal.parmar@codito.com \
--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