jdb jumps to the end of the functions stack if command eval(print, ...) is called to view value of a variable in the current stack function.
To reproduce:
* compile class below
* in jdb
* stop at FunctionStack:14
* run FunctionStack
* where
Gives 22 functions in the stack
* up
.
. 10 times
.
* up
* where
Gives 11 functions in the stack
* eval stLevel
* where
Gives 22 functions in the stack
=========================================
class FunctionStack {
static int amountOfCalls;
FunctionStack (int _amountOfCalls) {
amountOfCalls = _amountOfCalls;
}
int MakeStack(int stLevel) {
if (stLevel < amountOfCalls)
this.MakeStack(++stLevel);
System.out.println("Level: " + stLevel);
return stLevel;
}
public static void main(String args[]) {
FunctionStack fs = new FunctionStack(20);
fs.MakeStack(0);
}
}
It shows up on Solaris_JDK_1.3-b07
alexei.volkov@Eng 2000-03-23
To reproduce:
* compile class below
* in jdb
* stop at FunctionStack:14
* run FunctionStack
* where
Gives 22 functions in the stack
* up
.
. 10 times
.
* up
* where
Gives 11 functions in the stack
* eval stLevel
* where
Gives 22 functions in the stack
=========================================
class FunctionStack {
static int amountOfCalls;
FunctionStack (int _amountOfCalls) {
amountOfCalls = _amountOfCalls;
}
int MakeStack(int stLevel) {
if (stLevel < amountOfCalls)
this.MakeStack(++stLevel);
System.out.println("Level: " + stLevel);
return stLevel;
}
public static void main(String args[]) {
FunctionStack fs = new FunctionStack(20);
fs.MakeStack(0);
}
}
It shows up on Solaris_JDK_1.3-b07
alexei.volkov@Eng 2000-03-23
- duplicates
-
JDK-4296031 TTY: jdb loses track of current stack frame after print/dump
-
- Closed
-