This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
setting breakpoints in C++ ctors in shared libs that are executedbefore main
- From: Fons Rademakers <Fons dot Rademakers at cern dot ch>
- To: gdb at sources dot redhat dot com
- Date: 07 Jun 2004 12:25:22 +0200
- Subject: setting breakpoints in C++ ctors in shared libs that are executedbefore main
- Organization: CERN
Hi,
using gdb 5.3 and gdb 6.1 on Linux x86 I am not able to set any
breakpoints in code that will be executed when global C++ objects are
initialized before main is hit. These C++ objects are in a shared
library.
It seems the main issue is that the shared library symbol tables are not
read at gdb startup for a specific executable. Gdb must be able to look
at the list of shared libs against which the executable was linked and
load the symbols for these lib. Is there a switch to turn this behavior
on?
Note that the gdb on MacOS X works as expected.
Cheers, Fons.
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248
WWW: http://www.rademakers.org/fons/ Fax: +41 22 7679480