How can i debug a shared library using gdb..

How can i debug a shared library using gdb..

Post by v.nagasriniv » Sun, 27 Jan 2002 19:02:12



hi,

       How can i debug a function existing in a shared library using
gdb...( means how can i load into the gdb the library..)

thanks,
srinivas.

 
 
 

How can i debug a shared library using gdb..

Post by Mathias Waac » Sun, 27 Jan 2002 19:24:24



>        How can i debug a function existing in a shared library using
> gdb...( means how can i load into the gdb the library..)

You need program which links to this library. It is IMHO not possible to
run a shared library.
Maybe its just a misunderstanding, you've got a problem setting breakpoints
in functions included in the library after loading a program? This fails
just because the library is not linked at this time. You can either load
the library yourself (look at the gdb docu) or just set a breakpoint in
main and run the program. If you reach the break, the lib is loaded and you
can set breakpoints into your lib functions.

Mathias

 
 
 

1. debugging shared libraries using gdb

I am unable to debug shared libraries using gdb. This is
on a 2.0.28 machine (redhat 3.0.3 updated several times),
gdb-4.16, ld-linux-1.7.14, libc-5.3.12 and gcc-2.7.2. On
startup, gdb issues the following warning:

warning: Unable to find dynamic linker breakpoint function.
warning: GDB will be unable to debug shared library initializers
warning: and track explicitly loaded dynamic code.

Any help greatly appreciated
Sugata.
--
                              |
Sugata Mukhopadhyay           |   The time is gone, the song is over.

       http://www.cs.cornell.edu/Info/People/sugata/home.html

2. Xfree for QVision

3. debugging a shared library using gdb on linux

4. D-link dfe-530tx drivers in Linux 2.2 kernel?

5. gdb/ddd shared library debugging problem

6. Time Management package

7. Debug shared libraries with gdb ???

8. 2.7 Install on Dell 2300 w/Adaptec 7860

9. debugging shared libraries with gdb

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

11. Debugging shared libraries with gcc 2.95.2, gdb 4.18

12. Debugging shared libraries. gdb unexpected behaviour.

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