Debugging shared libraries. gdb unexpected behaviour.

Debugging shared libraries. gdb unexpected behaviour.

Post by mntg » Thu, 23 Jul 1998 04:00:00



We are debugging a shared library using gdb-4.16. Sources were compiled
with gcc-2.7.2.3 and linked with ld (binutils-2.8.1.0.1).

Trying a source list of a function linked into a shared library

(gdb) list func_foo

the de* shows only the FIRST function written into the shared
library source code file.

It is not possible to set breakpoints in the function func_foo. Also
this time, the FIRST function works fine, breakpoints can be set and
they are reached.

WHAT'S WORKING WRONG??? ...

maybe gdb ?
maybe ld ? shared library was builded from an archive libfoo_pic.a with
--whole-archive ld(1) switch

Please, a clue ...

 
 
 

Debugging shared libraries. gdb unexpected behaviour.

Post by mntg » Fri, 24 Jul 1998 04:00:00


Thanks

Upgrade to binutils-2.8.1.0.23 or later works fine.
Regards


> We are debugging a shared library using gdb-4.16. Sources were compiled
> with gcc-2.7.2.3 and linked with ld (binutils-2.8.1.0.1).

> Trying a source list of a function linked into a shared library

> (gdb) list func_foo

> the de* shows only the FIRST function written into the shared
> library source code file.

> It is not possible to set breakpoints in the function func_foo. Also
> this time, the FIRST function works fine, breakpoints can be set and
> they are reached.

> WHAT'S WORKING WRONG??? ...

> maybe gdb ?
> maybe ld ? shared library was builded from an archive libfoo_pic.a with
> --whole-archive ld(1) switch

> Please, a clue ...


 
 
 

1. gdb/ddd shared library debugging problem

Hi group,
i am having problems stepping into the shared library code by using
gdb (with/without a frontend like ddd etc). i tried compiling the
shared libary with absoloute src path & relative path both ... also
tried setting the shared libray path in gdb but of no use.
every time i step into a shared library function it says cannot not
find eval.c in the search path. also the execution line number it
reports in eval.c is 41 which is same alway. (Note: my project does
not has any file called eval.c & the shared library is loaded through
dlopen() ).
please provide me as much as possible information regarding this or
correct me if i m doing soming wrong.
regards
amit tikare

2. Connecting to Windows ISP

3. Debug shared libraries with gdb ???

4. S: IP over Telnet

5. debugging shared libraries with gdb

6. Monitor for SunSparc?

7. Will strip(debug shared library) == nodebug shared library ?

8. kernel fails to compile with 64MB RAM

9. How can i debug a shared library using gdb..

10. debugging shared libraries using gdb

11. Shared Library Debugging with -ldl / gdb "eval.c" no such file

12. Debugging shared libraries with gcc 2.95.2, gdb 4.18

13. debugging a shared library using gdb on linux