mirror of https://gitlab.com/basile.b/dexed.git
related to #199
This commit is contained in:
parent
632d89f537
commit
ede95a3cc6
Binary file not shown.
After Width: | Height: | Size: 823 B |
|
@ -13,7 +13,7 @@
|
||||||
<DpiAware Value="True/PM"/>
|
<DpiAware Value="True/PM"/>
|
||||||
</XPManifest>
|
</XPManifest>
|
||||||
<Icon Value="0"/>
|
<Icon Value="0"/>
|
||||||
<Resources Count="104">
|
<Resources Count="105">
|
||||||
<Resource_0 FileName="../icons/window/layout_add.png" Type="RCDATA" ResourceName="LAYOUT_ADD"/>
|
<Resource_0 FileName="../icons/window/layout_add.png" Type="RCDATA" ResourceName="LAYOUT_ADD"/>
|
||||||
<Resource_1 FileName="../icons/window/layout.png" Type="RCDATA" ResourceName="LAYOUT"/>
|
<Resource_1 FileName="../icons/window/layout.png" Type="RCDATA" ResourceName="LAYOUT"/>
|
||||||
<Resource_2 FileName="../icons/window/application_go.png" Type="RCDATA" ResourceName="APPLICATION_GO"/>
|
<Resource_2 FileName="../icons/window/application_go.png" Type="RCDATA" ResourceName="APPLICATION_GO"/>
|
||||||
|
@ -118,6 +118,7 @@
|
||||||
<Resource_101 FileName="../icons/other/warning.png" Type="RCDATA" ResourceName="WARNING"/>
|
<Resource_101 FileName="../icons/other/warning.png" Type="RCDATA" ResourceName="WARNING"/>
|
||||||
<Resource_102 FileName="../icons/other/break_reached.png" Type="RCDATA" ResourceName="BREAK_REACHED"/>
|
<Resource_102 FileName="../icons/other/break_reached.png" Type="RCDATA" ResourceName="BREAK_REACHED"/>
|
||||||
<Resource_103 FileName="../icons/other/break_set.png" Type="RCDATA" ResourceName="BREAK_SET"/>
|
<Resource_103 FileName="../icons/other/break_set.png" Type="RCDATA" ResourceName="BREAK_SET"/>
|
||||||
|
<Resource_104 FileName="../icons/other/debugger_inspect.png" Type="RCDATA" ResourceName="DEBUGGER_INSPECT"/>
|
||||||
</Resources>
|
</Resources>
|
||||||
</General>
|
</General>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -34,15 +34,15 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
Width = 517
|
Width = 517
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = 'CPU'
|
Caption = 'CPU'
|
||||||
ClientHeight = 161
|
ClientHeight = 160
|
||||||
ClientWidth = 515
|
ClientWidth = 513
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object cpuViewer: TTIPropertyGrid
|
object cpuViewer: TTIPropertyGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 161
|
Height = 160
|
||||||
Hint = 'cpu registers'
|
Hint = 'cpu registers'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 515
|
Width = 513
|
||||||
Align = alClient
|
Align = alClient
|
||||||
CheckboxForBoolean = True
|
CheckboxForBoolean = True
|
||||||
DefaultValueFont.Color = clWindowText
|
DefaultValueFont.Color = clWindowText
|
||||||
|
@ -75,13 +75,13 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
OnChange = PageControl2Change
|
OnChange = PageControl2Change
|
||||||
object TabSheet3: TTabSheet
|
object TabSheet3: TTabSheet
|
||||||
Caption = 'Variables'
|
Caption = 'Variables'
|
||||||
ClientHeight = 173
|
ClientHeight = 169
|
||||||
ClientWidth = 515
|
ClientWidth = 513
|
||||||
object lstVariables: TListView
|
object lstVariables: TListView
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 139
|
Height = 138
|
||||||
Top = 32
|
Top = 29
|
||||||
Width = 511
|
Width = 509
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoWidthLastColumn = True
|
AutoWidthLastColumn = True
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
|
@ -89,11 +89,11 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'name'
|
Caption = 'name'
|
||||||
Width = 53
|
Width = 47
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Caption = 'value'
|
Caption = 'value'
|
||||||
Width = 456
|
Width = 460
|
||||||
end>
|
end>
|
||||||
GridLines = True
|
GridLines = True
|
||||||
HideSelection = False
|
HideSelection = False
|
||||||
|
@ -106,10 +106,10 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
end
|
end
|
||||||
object varListFlt: TListViewFilterEdit
|
object varListFlt: TListViewFilterEdit
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 28
|
Height = 25
|
||||||
Hint = 'locate variables'
|
Hint = 'locate variables'
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 511
|
Width = 509
|
||||||
ButtonWidth = 24
|
ButtonWidth = 24
|
||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
Align = alTop
|
Align = alTop
|
||||||
|
@ -121,8 +121,8 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
end
|
end
|
||||||
object TabSheet4: TTabSheet
|
object TabSheet4: TTabSheet
|
||||||
Caption = 'Assembler'
|
Caption = 'Assembler'
|
||||||
ClientHeight = 173
|
ClientHeight = 169
|
||||||
ClientWidth = 515
|
ClientWidth = 513
|
||||||
object lstAsm: TListView
|
object lstAsm: TListView
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 160
|
Height = 160
|
||||||
|
@ -136,7 +136,7 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'address'
|
Caption = 'address'
|
||||||
Width = 67
|
Width = 61
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Caption = 'instruction'
|
Caption = 'instruction'
|
||||||
|
@ -209,14 +209,14 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object TabSheet1: TTabSheet
|
object TabSheet1: TTabSheet
|
||||||
Caption = 'Call stack'
|
Caption = 'Call stack'
|
||||||
ClientHeight = 173
|
ClientHeight = 169
|
||||||
ClientWidth = 515
|
ClientWidth = 513
|
||||||
object lstCallStack: TListView
|
object lstCallStack: TListView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 173
|
Height = 169
|
||||||
Hint = 'call stack'
|
Hint = 'call stack'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 515
|
Width = 513
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSort = False
|
AutoSort = False
|
||||||
Columns = <
|
Columns = <
|
||||||
|
@ -246,8 +246,8 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
end
|
end
|
||||||
object TabSheet2: TTabSheet
|
object TabSheet2: TTabSheet
|
||||||
Caption = 'Thread list'
|
Caption = 'Thread list'
|
||||||
ClientHeight = 173
|
ClientHeight = 169
|
||||||
ClientWidth = 515
|
ClientWidth = 513
|
||||||
object lstThreads: TListView
|
object lstThreads: TListView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 164
|
Height = 164
|
||||||
|
@ -261,32 +261,32 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'id'
|
Caption = 'id'
|
||||||
Width = 28
|
Width = 22
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'state'
|
Caption = 'state'
|
||||||
Width = 49
|
Width = 43
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'core'
|
Caption = 'core'
|
||||||
Width = 44
|
Width = 38
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'function'
|
Caption = 'function'
|
||||||
Width = 69
|
Width = 63
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'address'
|
Caption = 'address'
|
||||||
Width = 67
|
Width = 61
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'filename'
|
Caption = 'filename'
|
||||||
Width = 73
|
Width = 67
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Caption = 'line'
|
Caption = 'line'
|
||||||
|
@ -302,8 +302,8 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
end
|
end
|
||||||
object TabSheet5: TTabSheet
|
object TabSheet5: TTabSheet
|
||||||
Caption = 'Debugee options'
|
Caption = 'Debugee options'
|
||||||
ClientHeight = 173
|
ClientHeight = 169
|
||||||
ClientWidth = 515
|
ClientWidth = 513
|
||||||
object dbgeeOptsEd: TTIPropertyGrid
|
object dbgeeOptsEd: TTIPropertyGrid
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 160
|
Height = 160
|
||||||
|
@ -433,6 +433,17 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
resourceName = 'CAMERA_ADD'
|
resourceName = 'CAMERA_ADD'
|
||||||
scaledSeparator = False
|
scaledSeparator = False
|
||||||
end
|
end
|
||||||
|
object btnEval: TCEToolButton[11]
|
||||||
|
Left = 345
|
||||||
|
Hint = 'evaluate either a variable from the list or a custom expression'
|
||||||
|
Top = 0
|
||||||
|
Caption = 'btnEval'
|
||||||
|
DropdownMenu = mnuEval
|
||||||
|
OnClick = btnEvalClick
|
||||||
|
Style = tbsDropDown
|
||||||
|
resourceName = 'DEBUGGER_INSPECT'
|
||||||
|
scaledSeparator = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Splitter2: TSplitter[1]
|
object Splitter2: TSplitter[1]
|
||||||
|
@ -499,4 +510,24 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
Caption = 'machine instruction'
|
Caption = 'machine instruction'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object mnuEval: TPopupMenu[7]
|
||||||
|
left = 216
|
||||||
|
top = 168
|
||||||
|
object mnuEvalSelected: TMenuItem
|
||||||
|
AutoCheck = True
|
||||||
|
Caption = 'Evaluate selected variable'
|
||||||
|
Checked = True
|
||||||
|
OnClick = mnuEvalSelectedClick
|
||||||
|
end
|
||||||
|
object mnuEvalDeref: TMenuItem
|
||||||
|
AutoCheck = True
|
||||||
|
Caption = 'Evaluate dereference of selected variable'
|
||||||
|
OnClick = mnuEvalDerefClick
|
||||||
|
end
|
||||||
|
object mnuEvalCustom: TMenuItem
|
||||||
|
AutoCheck = True
|
||||||
|
Caption = 'Evaluate custom expression'
|
||||||
|
OnClick = mnuEvalCustomClick
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -372,9 +372,12 @@ type
|
||||||
property projectByFile[const fname: string]: TCEDebugeeOption read getProjectByFile; default;
|
property projectByFile[const fname: string]: TCEDebugeeOption read getProjectByFile; default;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TGdbEvalKind = (gekSelectedVar, gekDerefSelectedVar, gekCustom);
|
||||||
|
|
||||||
{ TCEGdbWidget }
|
{ TCEGdbWidget }
|
||||||
TCEGdbWidget = class(TCEWidget, ICEProjectObserver, ICEDocumentObserver, ICEDebugger)
|
TCEGdbWidget = class(TCEWidget, ICEProjectObserver, ICEDocumentObserver, ICEDebugger)
|
||||||
btnContinue: TCEToolButton;
|
btnContinue: TCEToolButton;
|
||||||
|
btnEval: TCEToolButton;
|
||||||
btnVariables: TCEToolButton;
|
btnVariables: TCEToolButton;
|
||||||
btnNext: TCEToolButton;
|
btnNext: TCEToolButton;
|
||||||
btnOver: TCEToolButton;
|
btnOver: TCEToolButton;
|
||||||
|
@ -388,12 +391,16 @@ type
|
||||||
Edit1: TComboBox;
|
Edit1: TComboBox;
|
||||||
GroupBox3: TGroupBox;
|
GroupBox3: TGroupBox;
|
||||||
lstThreads: TListView;
|
lstThreads: TListView;
|
||||||
|
mnuEvalDeref: TMenuItem;
|
||||||
|
mnuEvalSelected: TMenuItem;
|
||||||
|
mnuEvalCustom: TMenuItem;
|
||||||
mnuNextMachine: TMenuItem;
|
mnuNextMachine: TMenuItem;
|
||||||
mnuStepMachine: TMenuItem;
|
mnuStepMachine: TMenuItem;
|
||||||
mnuStep: TPopupMenu;
|
mnuStep: TPopupMenu;
|
||||||
PageControl1: TPageControl;
|
PageControl1: TPageControl;
|
||||||
PageControl2: TPageControl;
|
PageControl2: TPageControl;
|
||||||
mnuNext: TPopupMenu;
|
mnuNext: TPopupMenu;
|
||||||
|
mnuEval: TPopupMenu;
|
||||||
TabSheet1: TTabSheet;
|
TabSheet1: TTabSheet;
|
||||||
TabSheet2: TTabSheet;
|
TabSheet2: TTabSheet;
|
||||||
TabSheet3: TTabSheet;
|
TabSheet3: TTabSheet;
|
||||||
|
@ -419,6 +426,7 @@ type
|
||||||
dbgeeOptsEd: TTIPropertyGrid;
|
dbgeeOptsEd: TTIPropertyGrid;
|
||||||
varListFlt: TListViewFilterEdit;
|
varListFlt: TListViewFilterEdit;
|
||||||
procedure btnContClick(Sender: TObject);
|
procedure btnContClick(Sender: TObject);
|
||||||
|
procedure btnEvalClick(Sender: TObject);
|
||||||
procedure btnVariablesClick(Sender: TObject);
|
procedure btnVariablesClick(Sender: TObject);
|
||||||
procedure btnNextClick(Sender: TObject);
|
procedure btnNextClick(Sender: TObject);
|
||||||
procedure btnOverClick(Sender: TObject);
|
procedure btnOverClick(Sender: TObject);
|
||||||
|
@ -434,6 +442,9 @@ type
|
||||||
procedure Edit1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure Edit1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
procedure lstCallStackDblClick(Sender: TObject);
|
procedure lstCallStackDblClick(Sender: TObject);
|
||||||
procedure lstThreadsDblClick(Sender: TObject);
|
procedure lstThreadsDblClick(Sender: TObject);
|
||||||
|
procedure mnuEvalDerefClick(Sender: TObject);
|
||||||
|
procedure mnuEvalCustomClick(Sender: TObject);
|
||||||
|
procedure mnuEvalSelectedClick(Sender: TObject);
|
||||||
procedure mnuReadWClick(Sender: TObject);
|
procedure mnuReadWClick(Sender: TObject);
|
||||||
procedure mnuReadWriteWClick(Sender: TObject);
|
procedure mnuReadWriteWClick(Sender: TObject);
|
||||||
procedure mnuSelProjClick(Sender: TObject);
|
procedure mnuSelProjClick(Sender: TObject);
|
||||||
|
@ -444,6 +455,7 @@ type
|
||||||
protected
|
protected
|
||||||
procedure setToolBarFlat(value: boolean); override;
|
procedure setToolBarFlat(value: boolean); override;
|
||||||
private
|
private
|
||||||
|
fEvalKind: TGdbEvalKind;
|
||||||
fSynchronizedDocuments: TStringList;
|
fSynchronizedDocuments: TStringList;
|
||||||
fSynchronizingBreakpoints: boolean;
|
fSynchronizingBreakpoints: boolean;
|
||||||
fSyms: ICESymStringExpander;
|
fSyms: ICESymStringExpander;
|
||||||
|
@ -2525,6 +2537,27 @@ begin
|
||||||
continueDebugging;
|
continueDebugging;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEGdbWidget.btnEvalClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
e: string = '';
|
||||||
|
begin
|
||||||
|
if fGdb.isNil or not fGdb.Running then
|
||||||
|
exit;
|
||||||
|
case fEvalKind of
|
||||||
|
gekCustom:
|
||||||
|
if not InputQuery('Evaluate', 'Expression', e) then
|
||||||
|
e := '';
|
||||||
|
gekSelectedVar:
|
||||||
|
if lstVariables.ItemIndex <> -1 then
|
||||||
|
e := lstVariables.Items[lstVariables.ItemIndex].Caption;
|
||||||
|
gekDerefSelectedVar:
|
||||||
|
if lstVariables.ItemIndex <> -1 then
|
||||||
|
e := '*' + lstVariables.Items[lstVariables.ItemIndex].Caption;
|
||||||
|
end;
|
||||||
|
if not e.isBlank then
|
||||||
|
gdbCommand('-data-evaluate-expression "' + e + '"');
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEGdbWidget.btnVariablesClick(Sender: TObject);
|
procedure TCEGdbWidget.btnVariablesClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
infoVariables;
|
infoVariables;
|
||||||
|
@ -2646,6 +2679,27 @@ begin
|
||||||
doc.CaretY:= lne;
|
doc.CaretY:= lne;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEGdbWidget.mnuEvalDerefClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
fEvalKind := gekDerefSelectedVar;
|
||||||
|
mnuEvalSelected.Checked:=false;
|
||||||
|
mnuEvalCustom.Checked:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCEGdbWidget.mnuEvalCustomClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
fEvalKind := gekCustom;
|
||||||
|
mnuEvalSelected.Checked:=false;
|
||||||
|
mnuEvalDeref.Checked:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCEGdbWidget.mnuEvalSelectedClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
fEvalKind := gekSelectedVar;
|
||||||
|
mnuEvalCustom.Checked:=false;
|
||||||
|
mnuEvalDeref.Checked:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEGdbWidget.mnuReadWClick(Sender: TObject);
|
procedure TCEGdbWidget.mnuReadWClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
fAddWatchPointKind := wpkRead;
|
fAddWatchPointKind := wpkRead;
|
||||||
|
|
Loading…
Reference in New Issue