FpDebugger (pure): function name in stack

git-svn-id: trunk@44989 -
This commit is contained in:
martin 2014-05-10 02:01:14 +00:00
parent 95096bfbda
commit 87080f5081
2 changed files with 16 additions and 1 deletions

View File

@ -91,6 +91,7 @@ type
FIsSymbolResolved: boolean;
FSymbol: TFpDbgSymbol;
FRegisterValueList: TDbgRegisterValueList;
function GetFunctionName: string;
function GetSymbol: TFpDbgSymbol;
function GetLine: integer;
function GetSourceFile: string;
@ -100,6 +101,7 @@ type
property AnAddress: TDBGPtr read FAnAddress;
property FrameAdress: TDBGPtr read FFrameAdress;
property SourceFile: string read GetSourceFile;
property FunctionName: string read GetFunctionName;
property Line: integer read GetLine;
property RegisterValueList: TDbgRegisterValueList read FRegisterValueList;
end;
@ -382,6 +384,17 @@ begin
result := FSymbol;
end;
function TDbgCallstackEntry.GetFunctionName: string;
var
Symbol: TFpDbgSymbol;
begin
Symbol := GetSymbol;
if assigned(Symbol) then
result := Symbol.Name
else
result := '';
end;
function TDbgCallstackEntry.GetLine: integer;
var
Symbol: TFpDbgSymbol;

View File

@ -259,7 +259,9 @@ begin
e := TCallStackEntry(It.DataPtr^);
if e.Validity = ddsRequested then
begin
e.Init(ThreadCallStack[e.Index].AnAddress, nil, '', ThreadCallStack[e.Index].SourceFile, '', ThreadCallStack[e.Index].Line, ddsValid);
e.Init(ThreadCallStack[e.Index].AnAddress, nil,
ThreadCallStack[e.Index].FunctionName, ThreadCallStack[e.Index].SourceFile,
'', ThreadCallStack[e.Index].Line, ddsValid);
end;
It.Next;
end;