gdb/ddd shared library debugging problem

gdb/ddd shared library debugging problem

Post by Amit Tika » Sun, 09 Dec 2001 07:23:54



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
 
 
 

gdb/ddd shared library debugging problem

Post by Jens.Toerr.. » Mon, 10 Dec 2001 06:56:53



Quote:> 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() ).

Could it be that you try to step not into one of your own routines
but into one from libc? As far as I remeber eval.c is from libc and
since you probably didn't compile it yourself the de* can't find
the source code. Did you try to set a breakpoint into one of your own
functions and did this work?
                                      Regards, Jens
--
      _  _____  _____

  _  | |  | |    | |          AG Moebius, Institut fuer Molekuelphysik
 | |_| |  | |    | |          Fachbereich Physik, Freie Universitaet Berlin
  \___/ens|_|homs|_|oerring   Tel: ++49 (0)30 838 - 53394 / FAX: - 56046

 
 
 

gdb/ddd shared library debugging problem

Post by Rain » Mon, 10 Dec 2001 15:57:14


I am seeing this too.  You may be stepping into a shared library
without debugging information.  Try recompiling all relevent libraries
with debugging information.
 
 
 

gdb/ddd shared library debugging problem

Post by Amit Tika » Sat, 15 Dec 2001 12:58:05


actually its my own library that i was trying to step into (& i know
for sure that it has debugging enabled for compilation ) also i tried
to manually set the break point in library source but didnt work.
rgds
tikare


> > 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() ).

> Could it be that you try to step not into one of your own routines
> but into one from libc? As far as I remeber eval.c is from libc and
> since you probably didn't compile it yourself the de* can't find
> the source code. Did you try to set a breakpoint into one of your own
> functions and did this work?
>                                       Regards, Jens

 
 
 

1. Debug shared libraries with gdb ???

Could anyone give me pointers to information on how to debug shared
libraries with gdb ?  I seem to get garbage names on the stack when
I step into functions in the shared library and do a backtrace.

For example:

(gdb) where
#0  0xef740750 in _environ ()
#1  0xef74074c in _environ ()
#2  0xef74070c in _environ ()
#3  0x10740 in foo () at test2.c:11
#4  0x1071c in main (argc=1, argv=0xeffffa24) at test2.c:5

Where _environ should be function names "bar()" and "baz()" in the
shared library.

I'm on SunOS 5.4 using gcc 2.7.2 and gdb 4.11 .  Could there be a
problem with one of the versions I'm using that an upgrade could help ?

TIA.

2. Silicon Motion Lynx3DM configuration problem

3. debugging shared libraries with gdb

4. Hacking Attempts

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

6. ./bash/<filename> file or command not known

7. debugging shared libraries using gdb

8. Openwall kernel security patch ...

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

10. Debugging shared libraries with gcc 2.95.2, gdb 4.18

11. debugging a shared library using gdb on linux

12. Debugging shared libraries. gdb unexpected behaviour.

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