Debugging shared libraries with gcc 2.95.2, gdb 4.18

Debugging shared libraries with gcc 2.95.2, gdb 4.18

Post by Thomas Laebe %staff » Sun, 31 Dec 1899 09:00:00



Hello,

I'd like to debug shared libraries with gdb 4.18 compiled by gcc 2.95.2
on a Suse 7.0 Linux System.
My Problem is that no stops are done at breakpoints in the shared
library. The same source compiled with
the same options (namely -g) on Suse 6.3 with gcc 2.91.66 and then
debugged under Suse 7.0 can be
debugged without problems.

Can anybody help ?

 
 
 

Debugging shared libraries with gcc 2.95.2, gdb 4.18

Post by Scott Johnsto » Sun, 31 Dec 1899 09:00:00



> Hello,

> I'd like to debug shared libraries with gdb 4.18 compiled by gcc 2.95.2
> on a Suse 7.0 Linux System.
> My Problem is that no stops are done at breakpoints in the shared
> library. The same source compiled with
> the same options (namely -g) on Suse 6.3 with gcc 2.91.66 and then
> debugged under Suse 7.0 can be
> debugged without problems.

> Can anybody help ?

You can't set breakpoints in a shared library before a program is
started.  Maybe that is your problem.  I always do a "break main" first,
then run the program to that breakpoint, then set breakpoints in the
shared libraries.

Scott Johnston

 
 
 

Debugging shared libraries with gcc 2.95.2, gdb 4.18

Post by Dominique BOUR » Sun, 31 Dec 1899 09:00:00


I experienced the same problem... Solved by using kdevelop 1.2 on Mandrake
7.0 v2 only.. It works neither on RedHat, nor Suse, nor Mandrake 7.1 or
higher...

Strange problem...



Quote:> Hello,

> I'd like to debug shared libraries with gdb 4.18 compiled by gcc 2.95.2
> on a Suse 7.0 Linux System.
> My Problem is that no stops are done at breakpoints in the shared
> library. The same source compiled with
> the same options (namely -g) on Suse 6.3 with gcc 2.91.66 and then
> debugged under Suse 7.0 can be
> debugged without problems.

> Can anybody help ?

 
 
 

Debugging shared libraries with gcc 2.95.2, gdb 4.18

Post by Robert Kieslin » Sun, 31 Dec 1899 09:00:00



> I experienced the same problem... Solved by using kdevelop 1.2 on Mandrake
> 7.0 v2 only.. It works neither on RedHat, nor Suse, nor Mandrake 7.1 or
> higher...

> Strange problem...



> > Hello,

> > I'd like to debug shared libraries with gdb 4.18 compiled by gcc 2.95.2
> > on a Suse 7.0 Linux System.
> > My Problem is that no stops are done at breakpoints in the shared
> > library. The same source compiled with
> > the same options (namely -g) on Suse 6.3 with gcc 2.91.66 and then
> > debugged under Suse 7.0 can be
> > debugged without problems.

> > Can anybody help ?

I doubt it...  However, look at the "binutils" texinfo file,
particularly the "strip" and "ranlib," "objdump" pages, to determine
whether the symbols were retained in the libraries.  Also the "ld"
manual page and the Makefiles, if any, to determine if the linker
flags were responsible.

--
Robert Kiesling
Linux FAQ Maintainer

http://www.mainmatter.com/linux-faq/toc.html  http://www.mainmatter.com/

 
 
 

Debugging shared libraries with gcc 2.95.2, gdb 4.18

Post by Dominique BOUR » Sun, 31 Dec 1899 09:00:00


I tries this on 4 differents configurations and:

Mandrake 7.0 v1 ... OK
Mandrake 7.0 v2 ... OK
Mandrake 7.1    ... no
Mandrake 7.2    ... no
Suse 7.0   ... no
RedHat 7.0 ... no

I'm sure of that... It's not hypotetical... It's reality




> > I experienced the same problem... Solved by using kdevelop 1.2 on
Mandrake
> > 7.0 v2 only.. It works neither on RedHat, nor Suse, nor Mandrake 7.1 or
> > higher...

> > Strange problem...



> > > Hello,

> > > I'd like to debug shared libraries with gdb 4.18 compiled by gcc
2.95.2
> > > on a Suse 7.0 Linux System.
> > > My Problem is that no stops are done at breakpoints in the shared
> > > library. The same source compiled with
> > > the same options (namely -g) on Suse 6.3 with gcc 2.91.66 and then
> > > debugged under Suse 7.0 can be
> > > debugged without problems.

> > > Can anybody help ?

> I doubt it...  However, look at the "binutils" texinfo file,
> particularly the "strip" and "ranlib," "objdump" pages, to determine
> whether the symbols were retained in the libraries.  Also the "ld"
> manual page and the Makefiles, if any, to determine if the linker
> flags were responsible.

> --
> Robert Kiesling
> Linux FAQ Maintainer

> http://www.mainmatter.com/linux-faq/toc.html  http://www.mainmatter.com/

 
 
 

1. GCC 2.95.2 & Shared libraries

Greetings,

I recently installed GCC 2.95.2. But when I tried to compile some source
code with it, some shared libraries (libstdc++-...) included within GCC were
not found !

Could someone tell me how I should have installed GCC so that the dynamic
linker kept working fine ?

NB: I use Slackware 7.0. I don't know if this matters, but in case...

--
Beno?t Smith

2. PPP setup

3. gdb/ddd shared library debugging problem

4. NIS trouble

5. Debug shared libraries with gdb ???

6. need help for universe database

7. debugging shared libraries with gdb

8. CAI Courseware for UNIX?

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 a shared library using gdb on linux

13. Debugging shared libraries. gdb unexpected behaviour.