public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Robert Lockwood <rolockwo@cmguc.com>
To: <gdb@sources.redhat.com>
Subject: Problems Debugging Shared C++ Libs
Date: Mon, 28 Apr 2003 13:37:00 -0000	[thread overview]
Message-ID: <4DFD1EC3A4D2D5118D2C00508B8B461E013C2813@US-GLA-MAIL01.cmguc.com> (raw)

My group has been having a lot of problems debugging programs that are
linked to shared C++ libraries on Solaris 2.8.

The two biggest problems are the inability to consistently "step" and
failure to stop at break points.
 
I have run Linux side by side with Solaris, and Linux works fine.
Furthermore, I have tried almost all versions of the compiler from
2.95.2 through 3.2.2.  I have also tried various versions of gdb from
4.18 through 5.2.1 (having trouble building 5.3) and I have tried
various combinations of the g++/gdb versions.
 
Given a library (say libfoo), if libfoo is built as an archive then
stepping and breakpoints work fine.  Furthermore there are cases where
libfoo built as a shared library works fine.  It appears as though is
some sort of threshold and once that threshold is crossed, everything
falls apart.  For example, say libfoo contains some number of object
files, and a program links to libfoo everything appears to work fine.
The problem of step and break point failures can be seen by adding more
object files to libfoo (even though there are no references to the
symbols in these new objects from the program being debugged).  The
problem may be correlated to the use of templates but I'm not sure.
 
When compiling we are using "-fPIC -g".  When building the shared
library we are using "-shared".   Linking executable with "-fPIC -g".  
 
I have also experimented with various -g options, but nothing seems to
fix the problem.
 
Is anyone else experiencing such problems?  Does anyone know of a fix?
 
Any help appreciated!!!
 
Thanks,
Bob

Bob

                 reply	other threads:[~2003-04-28 13:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4DFD1EC3A4D2D5118D2C00508B8B461E013C2813@US-GLA-MAIL01.cmguc.com \
    --to=rolockwo@cmguc.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).