mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 15:00:24 +02:00
codetools: find gdb line: find proc body
git-svn-id: trunk@44948 -
This commit is contained in:
parent
c239838960
commit
a32057acc8
@ -34,7 +34,7 @@ uses
|
||||
Classes, SysUtils, FileUtil, LazLoggerBase, LazLogger, SynEdit, IDEDialogs,
|
||||
SrcEditorIntf, LazIDEIntf, ProjectIntf, Forms, Controls, Graphics, Dialogs,
|
||||
StdCtrls, ExtCtrls, ButtonPanel, CodyStrConsts, CodeCache, CodeToolManager,
|
||||
CodeTree, KeywordFuncLists;
|
||||
CodeTree, KeywordFuncLists, PascalParserTool, LinkScanner;
|
||||
|
||||
type
|
||||
|
||||
@ -492,12 +492,16 @@ begin
|
||||
|
||||
if Node.Desc=ctnProcedure then begin
|
||||
// proc node => find body
|
||||
debugln(['TCodyFindGDBLineDialog.FindGDBIdentifier AAA1']);
|
||||
ClassNode:=Tool.FindClassOrInterfaceNode(Node);
|
||||
if ClassNode<>nil then begin
|
||||
debugln(['TCodyFindGDBLineDialog.FindGDBIdentifier AAA2']);
|
||||
ProcNode:=Tool.FindCorrespondingProcNode(Node);
|
||||
debugln(['TCodyFindGDBLineDialog.FindGDBIdentifier AAA3 ',ProcNode<>nil]);
|
||||
try
|
||||
Tool.BuildTree(lsrInitializationStart);
|
||||
except
|
||||
on E: Exception do begin
|
||||
// ignore
|
||||
end;
|
||||
end;
|
||||
ProcNode:=Tool.FindCorrespondingProcNode(Node,[phpAddClassName]);
|
||||
if ProcNode<>nil then
|
||||
Node:=ProcNode;
|
||||
end;
|
||||
|
@ -863,7 +863,7 @@ begin
|
||||
if ClassNode<>nil then begin
|
||||
//debugln('TPascalReaderTool.FindCorrespondingProcNode Class');
|
||||
// in a class definition -> search method body
|
||||
StartNode:=ClassNode.GetTopMostNodeOfType(ctnTypeSection)
|
||||
StartNode:=ClassNode.GetTopMostNodeOfType(ctnTypeSection);
|
||||
end else if NodeIsMethodBody(ProcNode) then begin
|
||||
//debugln('TPascalReaderTool.FindCorrespondingProcNode Method ',ExtractClassNameOfProcNode(ProcNode));
|
||||
// in a method body -> search in class
|
||||
@ -890,7 +890,7 @@ begin
|
||||
if StartNode=nil then exit;
|
||||
|
||||
ProcHead:=ExtractProcHead(ProcNode,Attr);
|
||||
//debugln('TPascalReaderTool.FindCorrespondingProcNode StartNode=',StartNode.DescAsString,' ProcHead=',dbgstr(ProcHead));
|
||||
//debugln('TPascalReaderTool.FindCorrespondingProcNode StartNode=',StartNode.DescAsString,' ProcHead=',dbgstr(ProcHead),' ',dbgs(Attr),' ',StartNode.DescAsString);
|
||||
Result:=FindProcNode(StartNode,ProcHead,Attr);
|
||||
if Result=ProcNode then begin
|
||||
// found itself -> search further
|
||||
|
Loading…
Reference in New Issue
Block a user