This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

shlibs/1044: problems debugging dynamically-linked C++ code on Solaris


>Number:         1044
>Category:       shlibs
>Synopsis:       problems debugging dynamically-linked C++ code on Solaris
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 07 03:58:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     ucko@ncbi.nlm.nih.gov
>Release:        GNU gdb 5.0 - 5.3
>Organization:
>Environment:
SunOS serpens 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-80
gcc version 2.95.2 19991024 (release)
This GDB was configured as "sparc-sun-solaris2.8".
>Description:
I have run into severe problems attempting to debug dynamically-linked C++ applications (mostly still built with g++ 2.9x, though I think I see the same problems with 3.x) on Solaris.  (I don't know how many of those variables are relevant.)

Specifically:
* I cannot set breakpoints in shared libraries until the program has started; I can generally work around the issue by breaking in main and then setting the other breakpoints.
* GDB fails to restore these breakpoints if I have to kill and restart the program.
* In some circumstances, I cannot set breakpoints in shared libraries at all, getting errors about unwritable memory.
* Backtraces often list question marks instead of the names of functions in shared libraries; stepping into the same functions also skips over them.

5.0 actually seems to do better than newer versions in most of these respects.  (I don't have older versions handy to test.)

Typical build flags are -ftemplate-depth-32 -Wall -g (+ -fPIC for the shared libraries).
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]