Page 1 of 1

Can't set breakpoints in some files

Posted: Fri Jan 22, 2010 1:02 pm
by rsg
Hi,

So, I can set breakpoints in some source files, but not in others. For those I cannot, I can step inside them, and view variables, etc., but I still cannot set breakpoints - in some functions. The left gutter in the NBEclipse (Rel23_rc7a) debugger view seems to be indicating this. When it has a dark hatched appearance, breakpoints cannot be set; when it is light gray, they can be set.

The attached image illustrates this. I've been using NBEclipse for 2-3 years now, and I don't recall ever seeing this before.


Of course, the magic question is this: how do I get NBEclipse to let me set breakpoints there? What am I doing wrong? In the image, the function with the disabled breakpoints is a constructor that I call explicitly, and again, I can step into it, so I know it hasn't been optimized away.

Any ideas?
-Bob

Re: Can't set breakpoints in some files

Posted: Fri Jan 22, 2010 2:48 pm
by tod
It's a result of how gcc compiles constructors. This blog entry
[url]http://vladimir_prus.blogspot.com/2007/11/breakpoints-in-constructors.html[/url]
has a reasonably detailed explanation.

Re: Can't set breakpoints in some files

Posted: Sun Jan 24, 2010 5:00 pm
by rsg
I see - very interesting! Now that I know that, I can deal with it accordingly. Thanks for the explanation.