This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Breakpoint in object destructor
- From: Michael Chastain <mec dot gnu at mindspring dot com>
- To: jack dot bloch at siemens dot com, gdb at sources dot redhat dot com
- Cc: rafael dot benitez at siemens dot com
- Date: Wed, 04 Aug 2004 09:50:31 -0400
- Subject: Re: Breakpoint in object destructor
- References: <7A25937D23A1E64C8E93CB4A50509C2A0310F2F0@stca204a.bus.sc.rolm.com>
"Bloch, Jack" <jack.bloch@siemens.com> wrote:
> We are trying to set a breakpoint in a destructor. this does not seem to
> work. Running GDB 5.1.1 on a SuSE 2.4 Kernel. The breakpoint gets set, but
> it never fires.
>
What compiler are you using to build the program that you are compiling?
If you are using gcc 3.X, this is a known, unfixed problem.
See the PROBLEMS file in a recent release of gdb (like gdb 6.2)
for an explanation. Briefly: gcc 3.X emits two or three object code
functions for each destructor; gdb doesn't understand this;
so gdb puts a breakpoint in just one copy.
Michael C