added DumpStack procedure: it writes a back trace to the console / debugtxt

git-svn-id: trunk@7632 -
This commit is contained in:
vincents 2005-09-06 09:01:00 +00:00
parent 48d7da49f8
commit 7f0c6e6127

View File

@ -110,6 +110,7 @@ function StrToDouble(const s: string): double;
// debugging
procedure RaiseGDBException(const Msg: string);
procedure DumpExceptionBackTrace;
procedure DumpStack;
procedure DebugLn(const S: String; Args: array of const);
procedure DebugLn;
@ -600,6 +601,13 @@ begin
DebugLn(BackTraceStrFunc(Frames[FrameNumber]));
end;
procedure DumpStack;
Begin
if assigned(DebugText) then
Dump_Stack(DebugText^, get_frame);
End;
procedure MoveRect(var ARect: TRect; x, y: Integer);
begin
inc(ARect.Right,x-ARect.Left);