From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27591 invoked by alias); 28 Apr 2003 13:37:38 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 27578 invoked from network); 28 Apr 2003 13:37:35 -0000 Received: from unknown (HELO pots.cmguc.com) (208.251.204.109) by sources.redhat.com with SMTP; 28 Apr 2003 13:37:35 -0000 Received: from lockwoodw2k ([10.239.65.245]) by pots.cmguc.com (Mirapoint Messaging Server MOS 3.2.0.52-EA) with ESMTP id ADQ08501; Mon, 28 Apr 2003 09:37:09 -0400 (EDT) From: Robert Lockwood To: Subject: Problems Debugging Shared C++ Libs Date: Mon, 28 Apr 2003 13:37:00 -0000 Message-ID: <4DFD1EC3A4D2D5118D2C00508B8B461E013C2813@US-GLA-MAIL01.cmguc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-SW-Source: 2003-04/txt/msg00318.txt.bz2 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