mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 22:03:08 +02:00
Debugger: Fix attach dialog. Issue #0034028 Patch by Cyrax
git-svn-id: trunk@58638 -
This commit is contained in:
parent
6700ae635e
commit
98304b2635
@ -11,13 +11,13 @@ object DebugAttachDialogForm: TDebugAttachDialogForm
|
|||||||
Constraints.MinWidth = 400
|
Constraints.MinWidth = 400
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.3'
|
LCLVersion = '1.9.0.0'
|
||||||
object labelRunningProcesses: TLabel
|
object labelRunningProcesses: TLabel
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 13
|
Height = 17
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 90
|
Width = 123
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'Running Processes'
|
Caption = 'Running Processes'
|
||||||
@ -31,8 +31,8 @@ object DebugAttachDialogForm: TDebugAttachDialogForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = btnRefresh
|
AnchorSideBottom.Control = btnRefresh
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 475
|
Height = 467
|
||||||
Top = 25
|
Top = 29
|
||||||
Width = 388
|
Width = 388
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -43,27 +43,27 @@ object DebugAttachDialogForm: TDebugAttachDialogForm
|
|||||||
end
|
end
|
||||||
item
|
item
|
||||||
Caption = 'PID'
|
Caption = 'PID'
|
||||||
Width = 150
|
Width = 165
|
||||||
end>
|
end>
|
||||||
OwnerData = True
|
OwnerData = True
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
RowSelect = True
|
RowSelect = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ViewStyle = vsReport
|
ViewStyle = vsReport
|
||||||
OnChange = lvProcessesChange
|
|
||||||
OnColumnClick = lvProcessesColumnClick
|
OnColumnClick = lvProcessesColumnClick
|
||||||
OnData = lvProcessesData
|
OnData = lvProcessesData
|
||||||
OnDblClick = lvProcessesDblClick
|
OnDblClick = lvProcessesDblClick
|
||||||
OnKeyDown = lvProcessesKeyDown
|
OnKeyDown = lvProcessesKeyDown
|
||||||
|
OnSelectItem = lvProcessesSelectItem
|
||||||
end
|
end
|
||||||
object btnRefresh: TButton
|
object btnRefresh: TButton
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideBottom.Control = Owner
|
AnchorSideBottom.Control = Owner
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 27
|
||||||
Top = 506
|
Top = 502
|
||||||
Width = 64
|
Width = 61
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
@ -77,10 +77,10 @@ object DebugAttachDialogForm: TDebugAttachDialogForm
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideBottom.Control = btnRefresh
|
AnchorSideBottom.Control = btnRefresh
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 76
|
Left = 73
|
||||||
Height = 23
|
Height = 27
|
||||||
Top = 506
|
Top = 502
|
||||||
Width = 58
|
Width = 52
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
@ -94,10 +94,10 @@ object DebugAttachDialogForm: TDebugAttachDialogForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = btnRefresh
|
AnchorSideBottom.Control = btnRefresh
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 336
|
Left = 340
|
||||||
Height = 23
|
Height = 27
|
||||||
Top = 506
|
Top = 502
|
||||||
Width = 58
|
Width = 54
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
|
@ -30,13 +30,12 @@ type
|
|||||||
lvProcesses: TListView;
|
lvProcesses: TListView;
|
||||||
procedure btnRefreshClick(Sender: TObject);
|
procedure btnRefreshClick(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure lvProcessesChange(Sender: TObject; Item: TListItem;
|
|
||||||
{%H-}Change: TItemChange);
|
|
||||||
procedure lvProcessesColumnClick(Sender: TObject; Column: TListColumn);
|
procedure lvProcessesColumnClick(Sender: TObject; Column: TListColumn);
|
||||||
procedure lvProcessesData(Sender: TObject; Item: TListItem);
|
procedure lvProcessesData(Sender: TObject; Item: TListItem);
|
||||||
procedure lvProcessesDblClick(Sender: TObject);
|
procedure lvProcessesDblClick(Sender: TObject);
|
||||||
procedure lvProcessesKeyDown(Sender: TObject; var Key: Word;
|
procedure lvProcessesKeyDown(Sender: TObject; var Key: Word;
|
||||||
{%H-}Shift: TShiftState);
|
{%H-}Shift: TShiftState);
|
||||||
|
procedure lvProcessesSelectItem(Sender: TObject; Item: TListItem; Selected: Boolean);
|
||||||
private
|
private
|
||||||
FPidString: string;
|
FPidString: string;
|
||||||
FList: TRunningProcessInfoList;
|
FList: TRunningProcessInfoList;
|
||||||
@ -282,12 +281,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDebugAttachDialogForm.lvProcessesChange(Sender: TObject;
|
procedure TDebugAttachDialogForm.lvProcessesSelectItem(Sender: TObject; Item: TListItem; Selected: Boolean);
|
||||||
Item: TListItem; Change: TItemChange);
|
|
||||||
var
|
var
|
||||||
info: TRunningProcessInfo;
|
info: TRunningProcessInfo;
|
||||||
begin
|
begin
|
||||||
if Item.Index <> -1 then
|
if (Item.Index <> -1) And Selected then
|
||||||
begin
|
begin
|
||||||
info := TRunningProcessInfo(FList.Items[Item.Index]);
|
info := TRunningProcessInfo(FList.Items[Item.Index]);
|
||||||
FPidString := IntToStr(info.PID);
|
FPidString := IntToStr(info.PID);
|
||||||
|
Loading…
Reference in New Issue
Block a user