This is the mail archive of the gdb@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]

Re: Breakpoints in constructor/destructor


On Mon, Jun 23, 2003 at 02:56:33PM -0500, MONWHEA JENG wrote:
> 
> Hi,
> 
> 	I just downloaded gdb onto cygwin. I found it pretty
> wonderful, but there's one thing I'm completely baffled by. I
> can't seem to set breakpoints in constructors or destructors
> in my C++ programs. I wrote a simple program that does nothing but
> create and destroy a simple object. When I step through it, I can see
> my cout statements in the constructors and destructors being called.
> But if I set breakpoints at these lines, the gdb doesn't stop there.
> The program is reproduced below, but it's pretty simple---there's
> not much to see. I read the gdb manual, but saw no mention of 
> any special issues related to constructors and destructors. And
> I see that there was a thread earlier this year on "breakpoints
> in constructors," but unfortunately, I found it incomprehensible.
> 
> 	Any help would be appreciated. Or, any suggestion on how
> I could have figured this out on my own, from the gdb manual
> or other source. 

Neither, sorry - this is still an open problem, and we're still trying
to find a good solution.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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