mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 14:09:31 +02:00
DebugManager: Cleanup.
git-svn-id: trunk@56141 -
This commit is contained in:
parent
e34b72f9d9
commit
4d597500d4
@ -601,20 +601,16 @@ begin
|
|||||||
if AUnitinfo.SrcClassName<>'' then
|
if AUnitinfo.SrcClassName<>'' then
|
||||||
ProcDef := AUnitinfo.SrcClassName+'.';
|
ProcDef := AUnitinfo.SrcClassName+'.';
|
||||||
ProcDef := ProcDef+AUnitinfo.FunctionName;
|
ProcDef := ProcDef+AUnitinfo.FunctionName;
|
||||||
debugln(['TDebugManager.FindFullFilenameSrc Code="',Code.Filename,'" ProcDef="',ProcDef,'"']);
|
|
||||||
// search proc in unit
|
// search proc in unit
|
||||||
if not CodeToolBoss.FindProcDeclaration(Code,ProcDef,CurCodeTool,CurCodeNode,
|
if not CodeToolBoss.FindProcDeclaration(Code,ProcDef,CurCodeTool,CurCodeNode,
|
||||||
[phpWithoutParamList,phpWithoutBrackets,phpWithoutClassKeyword,phpWithoutSemicolon])
|
[phpWithoutParamList,phpWithoutBrackets,phpWithoutClassKeyword,phpWithoutSemicolon])
|
||||||
then begin
|
then
|
||||||
debugln(['TDebugManager.FindFullFilenameSrc not found: Code="',Code.Filename,'" ProcDef="',ProcDef,'"']);
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
|
||||||
// get file, line, column
|
// get file, line, column
|
||||||
if CurCodeNode.Desc=ctnProcedure then
|
if CurCodeNode.Desc=ctnProcedure then
|
||||||
CurCodeNode := CurCodeNode.FirstChild; // jump to Name instead of keyword 'procedure'
|
CurCodeNode := CurCodeNode.FirstChild; // jump to Name instead of keyword 'procedure'
|
||||||
if not CurCodeTool.CleanPosToCaret(CurCodeNode.StartPos,CodePos) then
|
if not CurCodeTool.CleanPosToCaret(CurCodeNode.StartPos,CodePos) then
|
||||||
exit;
|
exit;
|
||||||
debugln(['TDebugManager.FindFullFilenameSrc found ',CodePos.Code.Filename,' Line=',CodePos.Y,' Col=',CodePos.X]);
|
|
||||||
AUnitinfo.LocationFullFile := CodePos.Code.Filename;
|
AUnitinfo.LocationFullFile := CodePos.Code.Filename;
|
||||||
AUnitinfo.SrcLine := CodePos.Y;
|
AUnitinfo.SrcLine := CodePos.Y;
|
||||||
//DumpStack;
|
//DumpStack;
|
||||||
@ -627,22 +623,14 @@ function TDebugManager.GetFullFilename(const AUnitinfo: TDebuggerUnitInfo;
|
|||||||
function ResolveFromDbg: Boolean;
|
function ResolveFromDbg: Boolean;
|
||||||
begin
|
begin
|
||||||
Filename := AUnitinfo.FileName;
|
Filename := AUnitinfo.FileName;
|
||||||
if Filename<>'' then
|
|
||||||
DebugLn('TDebugManager.GetFullFilename->ResolveFromDbg: Trying with Filename=', Filename);
|
|
||||||
Result := (Filename<>'') and GetFullFilename(Filename, False) and FileExistsUTF8(Filename);
|
Result := (Filename<>'') and GetFullFilename(Filename, False) and FileExistsUTF8(Filename);
|
||||||
|
if Result then Exit;
|
||||||
|
Filename := AUnitinfo.DbgFullName;
|
||||||
|
if Filename='' then
|
||||||
|
Exit(False);
|
||||||
|
Result := FileExistsUTF8(Filename);
|
||||||
if not Result then
|
if not Result then
|
||||||
begin
|
Result := GetFullFilename(Filename, AskUserIfNotFound);
|
||||||
Filename := AUnitinfo.DbgFullName;
|
|
||||||
if Filename='' then
|
|
||||||
Exit(False);
|
|
||||||
DebugLn('TDebugManager.GetFullFilename->ResolveFromDbg: Trying with DbgFullName=', Filename);
|
|
||||||
Result := FileExistsUTF8(Filename);
|
|
||||||
if not Result then
|
|
||||||
begin
|
|
||||||
DebugLn('TDebugManager.GetFullFilename->ResolveFromDbg: DbgFullName=', Filename, ' does not exist.');
|
|
||||||
Result := GetFullFilename(Filename, AskUserIfNotFound);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user