User forums > Help
debugging on linux: strange symbols, files open twice, "nothing to be done"
mandrav:
--- Quote from: CuteAlien on September 07, 2008, 02:21:28 am ---The debugger can often not find local variables. I just get "No locals" in the Watches view or "no symbol X in current context" when trying to use mouse-over. Function Arguments including this object are available. Any ideas?
--- End quote ---
Do you have the debugger's debug log enabled? If not, enable it (Settings->Compiler&Debugger->Debugger->Display debugger's log) and have a look at it next time this problem happens again. It would hopefully tell us if it's a C::B problem (e.g. parsing) or not.
Jenna:
--- Quote from: CuteAlien on September 07, 2008, 02:21:28 am ---Another debugging problem :-(
The debugger can often not find local variables. I just get "No locals" in the Watches view or "no symbol X in current context" when trying to use mouse-over. Function Arguments including this object are available. Any ideas?
--- End quote ---
This happens for me in (some ?) constructors.
Here is an article that is somewhat related to this problem: http://vladimir_prus.blogspot.com/2007/11/breakpoints-in-constructors.html.
With newer versions of gdb at least breakpoints in constructors work, but the problem with sometimes not showing locals is not (yet) resolved afaik.
mandrav:
--- Quote from: jens on September 07, 2008, 11:58:33 am ---This happens for me in (some ?) constructors.
--- End quote ---
Yes, this does happen in ctors. But I don't complain; I feel blessed that breakpoints are even working in ctors now ;) (in earlier gdb versions this didn't even work)
CuteAlien:
Thanks again - that was the reason. I'm using some rather unusual long constructors in some testclasses, so I didn't notice those breakpoints where in a constructor. And I suppose this might maybe also be related to the problem when my application suddenly continues running. I think that also happened mostly after stepping into library code after hitting a breakpoint in a constructor. But I will keep an eye open for this.
Do you have any hints for me how to display arrays of wchar_t's as easy readable strings?
new_user:
I am also seeing the same exact problem as CuteAlien in that the debugger can often not find local variables. I also get "No locals" in the Watches view or "no symbol X in current context".
I am developing in C++ also, but I am not using objects (i.e. structural C++). I am seeing these problems in just straight C functions.
I enabled the debugger's debug log and stepped through a couple of my functions and unfortunately it doesn't say there is any kind of a problem or error. It just reiterates what is in the watch window.
One of my super simple functions-
int getRandomNum(int MaxNum)
{
srand((unsigned)time(0));
int randomNum = (rand()%MaxNum)+1;
return randomNum;
}
has a watch window of:
Local variables
No locals.
Function Arguments
MaxNum = 1
and a Debugger (debug) Log of:
>>>>>>cb_gdb:
> info locals
No locals.
>>>>>>cb_gdb:
> info args
MaxNum = 1
>>>>>>cb_gdb:
I am using Code::blocks on Ubuntu 8.04 (Hardy). It is version SVN 5195 Build: Aug 27 2008, 20:01:05 - wx2.8.8 (Linux, unicode). I also have all compile optimizations turned off.
Thanks,
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version