On 28/03/2012 14:30, Ludo Brands wrote:
Hi,
Encountered an endless loop with the debugger while stepping through code
and the call stack window open. The Debug Output window is filling up with
messages like this:
<-stack-select-frame 2158>
^done
(gdb)
<-data-evaluate-expression $fp>
^done,value="0x34bf780"
(gdb)
<-stack-select-frame 2159>
^done
(gdb)
I can see what happens, and where to build in protection.
It looks like it is searching for the parent frame of a nested procedure.
procedure Foo;
procedure FooInner;
begin
// watches can refer to "Foo" (parent)
FooInner;
end;
begin end;
If FooInner called itself 1000 times, then "Foo" is 1000 frames up
But in this case, it seems it was searching outside the stack. $fp is
not changing. So gdb is not actually switching to that stack frame
(likely because it does not exist)
----------
Does the app use threads?
It can also be, that if the app was compiled with optimization, the
value that is searched for, was incorrect....
<-data-evaluate-expression $fp>
^done,value="0x34bf780"
(gdb)
<-stack-select-frame 2160>
^done
(gdb)
<-data-evaluate-expression $fp>
^done,value="0x34bf780"
(gdb)
<-stack-select-frame 2161>
^done
Stopping the debugger is the only way out.
Windows XP sp2, gdb 7.3, Lazarus 0.9.31 svn 36383.
Not sure if I'll be able to reproduce this.
Ludo
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus