setting breakpoints in C++ ctors in shared libs that are executed before main

Fons Rademakers
Mon Jun 7 10:25:00 GMT 2004


  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

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

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:              Phone: +41 22 7679248
WWW:      Fax:   +41 22 7679480

More information about the Gdb mailing list