User forums > Using Code::Blocks
A bug of "Call stack" view....
(1/1)
nanyu:
0, I have the code, that : main call L1, L1 call L2, ...., like:
main ()
{
L1();
}
L1()
{
L2();
}
L2()
{
L3();
}
L3()
{
int a;
int b = a;
}
/////////////
1. now I debug (step) those code, ....and I step into L3, the cursor now at the line : "int a;"
2. I open the "Call stack" (debug -> debugging windows -> call stack) .... !!! now the cursor position wil MOVE TO the L2.
3. I press the F7, the position move to "int b = a;", AND ! as soon as, it come back to "L2()"...
sorry for my pool English!
who can help me ? thanks!
//////////////////
windows xp;
gdb 5.2.1
g++ 3.4.5
killerbot:
Hi,
Though I have not tried out your example, things I can say are :
* your GDB is very old, and more or less no longer supported by CB
* your GCC is also rather old.
I will run your test case on my more 'modern' ;-) installation and past my results.
killerbot:
--- Code: ---void L3()
{
int a;
int b = a;
}
void L2()
{
L3();
}
void L1()
{
L2();
}
int main ()
{
L1();
}
--- End code ---
* first of all when I step into L3, the cursor is on int b=a, which is normal because the line int a; does not contain any executable statements
* then I ask the call stack : which says I am in L3, and the cursor also stays on the line int b = a;
* then I step : I end up at the closing brace of L3, and the callstack still says I am in L3
* then I step : I end up at the closing brace of L2, and the callstack still says I am in L2
* ....
so works correctly.
I am using : GDB 6.8, GCC : 4.3.1 , CB : latest revision from svn, all on linux
Navigation
[0] Message Index
Go to full version