mirror of https://gitlab.com/basile.b/dexed.git
#97, update UI
This commit is contained in:
parent
ee6e282f2b
commit
c33d66c060
|
@ -20,27 +20,27 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
ClientWidth = 517
|
ClientWidth = 517
|
||||||
object Panel1: TPanel[0]
|
object Panel1: TPanel[0]
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 424
|
Height = 394
|
||||||
Top = 166
|
Top = 196
|
||||||
Width = 517
|
Width = 517
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 424
|
ClientHeight = 394
|
||||||
ClientWidth = 517
|
ClientWidth = 517
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object GroupBox3: TGroupBox
|
object GroupBox3: TGroupBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 227
|
Height = 197
|
||||||
Top = 197
|
Top = 197
|
||||||
Width = 517
|
Width = 517
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = 'CPU'
|
Caption = 'CPU'
|
||||||
ClientHeight = 197
|
ClientHeight = 167
|
||||||
ClientWidth = 513
|
ClientWidth = 513
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object cpuVIewer: TTIPropertyGrid
|
object cpuVIewer: TTIPropertyGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 197
|
Height = 167
|
||||||
Hint = 'cpu registers'
|
Hint = 'cpu registers'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 513
|
Width = 513
|
||||||
|
@ -65,36 +65,46 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
ClientHeight = 161
|
ClientHeight = 161
|
||||||
ClientWidth = 513
|
ClientWidth = 513
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object ValueListEditor1: TValueListEditor
|
object varList: TListView
|
||||||
Left = 4
|
Left = 2
|
||||||
Height = 153
|
Height = 135
|
||||||
Hint = 'variables'
|
Top = 24
|
||||||
Top = 4
|
Width = 509
|
||||||
Width = 505
|
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoAdvance = aaDown
|
BorderSpacing.Around = 2
|
||||||
BorderSpacing.Around = 4
|
Columns = <
|
||||||
BorderStyle = bsNone
|
item
|
||||||
Color = clDefault
|
AutoSize = True
|
||||||
DefaultColWidth = 128
|
Caption = 'Name'
|
||||||
DefaultRowHeight = 24
|
Width = 47
|
||||||
FixedCols = 0
|
end
|
||||||
Flat = True
|
item
|
||||||
GridLineWidth = 0
|
AutoSize = True
|
||||||
RowCount = 2
|
Caption = 'Value'
|
||||||
|
Width = 458
|
||||||
|
end>
|
||||||
|
GridLines = True
|
||||||
|
HideSelection = False
|
||||||
|
ReadOnly = True
|
||||||
|
ScrollBars = ssAutoBoth
|
||||||
|
SortColumn = 0
|
||||||
|
SortType = stText
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goColSizing, goAlwaysShowEditor, goThumbTracking]
|
ViewStyle = vsReport
|
||||||
Strings.Strings = (
|
end
|
||||||
''
|
object varListFlt: TListViewFilterEdit
|
||||||
)
|
Left = 2
|
||||||
TitleCaptions.Strings = (
|
Height = 20
|
||||||
'name'
|
Hint = 'locate variables'
|
||||||
'value'
|
Top = 2
|
||||||
)
|
Width = 509
|
||||||
ColWidths = (
|
ButtonWidth = 24
|
||||||
128
|
NumGlyphs = 1
|
||||||
377
|
Align = alTop
|
||||||
)
|
BorderSpacing.Around = 2
|
||||||
|
MaxLength = 0
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = varListFltChange
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Splitter4: TSplitter
|
object Splitter4: TSplitter
|
||||||
|
@ -144,17 +154,17 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
end
|
end
|
||||||
object GroupBox1: TGroupBox[2]
|
object GroupBox1: TGroupBox[2]
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 161
|
Height = 191
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 517
|
Width = 517
|
||||||
Align = alTop
|
Align = alTop
|
||||||
Caption = 'Call stack'
|
Caption = 'Call stack'
|
||||||
ClientHeight = 131
|
ClientHeight = 161
|
||||||
ClientWidth = 513
|
ClientWidth = 513
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object lstCallStack: TListView
|
object lstCallStack: TListView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 131
|
Height = 161
|
||||||
Hint = 'call stack'
|
Hint = 'call stack'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 513
|
Width = 513
|
||||||
|
@ -186,7 +196,7 @@ inherited CEGdbWidget: TCEGdbWidget
|
||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 5
|
Height = 5
|
||||||
Top = 161
|
Top = 191
|
||||||
Width = 517
|
Width = 517
|
||||||
Align = alTop
|
Align = alTop
|
||||||
ResizeAnchor = akTop
|
ResizeAnchor = akTop
|
||||||
|
|
|
@ -7,10 +7,10 @@ interface
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, RegExpr, ComCtrls,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, RegExpr, ComCtrls,
|
||||||
PropEdits, GraphPropEdits, RTTIGrids, Dialogs, ExtCtrls, Menus, Buttons,
|
PropEdits, GraphPropEdits, RTTIGrids, Dialogs, ExtCtrls, Menus, Buttons,
|
||||||
StdCtrls, ValEdit, process, fpjson, typinfo, {$IFDEF UNIX}Unix,{$ENDIF}
|
StdCtrls, process, fpjson, typinfo, {$IFDEF UNIX}Unix,{$ENDIF} ListViewFilterEdit,
|
||||||
ce_common, ce_interfaces, ce_widget, ce_processes, ce_observer, ce_synmemo,
|
ce_common, ce_interfaces, ce_widget, ce_processes, ce_observer, ce_synmemo,
|
||||||
ce_sharedres, ce_stringrange, ce_dsgncontrols, ce_dialogs, ce_dbgitf,
|
ce_sharedres, ce_stringrange, ce_dsgncontrols, ce_dialogs, ce_dbgitf,
|
||||||
ce_ddemangle, ce_writableComponent;
|
ce_ddemangle, ce_writableComponent, EditBtn, strutils;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -331,6 +331,7 @@ type
|
||||||
GroupBox1: TGroupBox;
|
GroupBox1: TGroupBox;
|
||||||
GroupBox2: TGroupBox;
|
GroupBox2: TGroupBox;
|
||||||
GroupBox3: TGroupBox;
|
GroupBox3: TGroupBox;
|
||||||
|
varList: TListView;
|
||||||
lstCallStack: TListView;
|
lstCallStack: TListView;
|
||||||
mnuReadW: TMenuItem;
|
mnuReadW: TMenuItem;
|
||||||
mnuWriteW: TMenuItem;
|
mnuWriteW: TMenuItem;
|
||||||
|
@ -346,7 +347,7 @@ type
|
||||||
Splitter2: TSplitter;
|
Splitter2: TSplitter;
|
||||||
Splitter3: TSplitter;
|
Splitter3: TSplitter;
|
||||||
Splitter4: TSplitter;
|
Splitter4: TSplitter;
|
||||||
ValueListEditor1: TValueListEditor;
|
varListFlt: TListViewFilterEdit;
|
||||||
procedure btnContClick(Sender: TObject);
|
procedure btnContClick(Sender: TObject);
|
||||||
procedure btnVariablesClick(Sender: TObject);
|
procedure btnVariablesClick(Sender: TObject);
|
||||||
procedure btnNextClick(Sender: TObject);
|
procedure btnNextClick(Sender: TObject);
|
||||||
|
@ -365,6 +366,7 @@ type
|
||||||
procedure mnuSelProjClick(Sender: TObject);
|
procedure mnuSelProjClick(Sender: TObject);
|
||||||
procedure mnuSelRunnableClick(Sender: TObject);
|
procedure mnuSelRunnableClick(Sender: TObject);
|
||||||
procedure mnuWriteWClick(Sender: TObject);
|
procedure mnuWriteWClick(Sender: TObject);
|
||||||
|
procedure varListFltChange(Sender: TObject);
|
||||||
protected
|
protected
|
||||||
procedure setToolBarFlat(value: boolean); override;
|
procedure setToolBarFlat(value: boolean); override;
|
||||||
private
|
private
|
||||||
|
@ -969,8 +971,9 @@ end;
|
||||||
|
|
||||||
procedure TCEGdbWidget.setToolBarFlat(value: boolean);
|
procedure TCEGdbWidget.setToolBarFlat(value: boolean);
|
||||||
begin
|
begin
|
||||||
inherited setToolBarFLat(value);
|
inherited setToolBarFlat(value);
|
||||||
btnSendCom.Flat:=value;
|
btnSendCom.Flat:=value;
|
||||||
|
varListFlt.flat := value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEGdbWidget.updateMenu;
|
procedure TCEGdbWidget.updateMenu;
|
||||||
|
@ -1274,6 +1277,7 @@ begin
|
||||||
btnReg.Enabled:=false;
|
btnReg.Enabled:=false;
|
||||||
btnVariables.Enabled:=false;
|
btnVariables.Enabled:=false;
|
||||||
btnStack.Enabled:=false;
|
btnStack.Enabled:=false;
|
||||||
|
varList.Clear;
|
||||||
end;
|
end;
|
||||||
gsPaused:
|
gsPaused:
|
||||||
begin
|
begin
|
||||||
|
@ -1321,6 +1325,21 @@ begin
|
||||||
mnuReadWriteW.Checked:=false;
|
mnuReadWriteW.Checked:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEGdbWidget.varListFltChange(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
if varListFlt.Filter = '' then
|
||||||
|
exit;
|
||||||
|
for i:= 0 to varList.Items.Count-1 do
|
||||||
|
if AnsiContainsText(varList.Items[i].Caption, varListFlt.Filter) then
|
||||||
|
begin
|
||||||
|
varList.ItemIndex:=i;
|
||||||
|
varList.Selected.MakeVisible(false);
|
||||||
|
break;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEGdbWidget.disableEditor;
|
procedure TCEGdbWidget.disableEditor;
|
||||||
begin
|
begin
|
||||||
cpuVIewer.ItemIndex:=-1;
|
cpuVIewer.ItemIndex:=-1;
|
||||||
|
@ -1333,6 +1352,7 @@ var
|
||||||
i: integer;
|
i: integer;
|
||||||
b: TPersistentBreakPoint;
|
b: TPersistentBreakPoint;
|
||||||
begin
|
begin
|
||||||
|
varList.Clear;
|
||||||
if not fDbgRunnable and (fProj = nil) then
|
if not fDbgRunnable and (fProj = nil) then
|
||||||
begin
|
begin
|
||||||
dlgOkInfo('No project to debug', 'GDB commander');
|
dlgOkInfo('No project to debug', 'GDB commander');
|
||||||
|
@ -1653,6 +1673,7 @@ var
|
||||||
val: TJSONData;
|
val: TJSONData;
|
||||||
obj: TJSONObject;
|
obj: TJSONObject;
|
||||||
arr: TJSONArray;
|
arr: TJSONArray;
|
||||||
|
k: TListItem;
|
||||||
// common data
|
// common data
|
||||||
nme: string;
|
nme: string;
|
||||||
reason: string;
|
reason: string;
|
||||||
|
@ -1693,9 +1714,9 @@ begin
|
||||||
val := obj.Find('exp');
|
val := obj.Find('exp');
|
||||||
if val.isNotNil then
|
if val.isNotNil then
|
||||||
begin
|
begin
|
||||||
ValueListEditor1.FindRow(val.AsString, i);
|
k := varList.FindCaption(0, val.AsString, false, true, false);
|
||||||
if i <> -1 then
|
if k.isNotNil then
|
||||||
ValueListEditor1.Row:=i;
|
varList.ItemIndex:=k.index;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -1883,9 +1904,9 @@ begin
|
||||||
val := fJson.Find('variables');
|
val := fJson.Find('variables');
|
||||||
if val.isNotNil and (val.JSONType = jtArray) then
|
if val.isNotNil and (val.JSONType = jtArray) then
|
||||||
begin
|
begin
|
||||||
i := ValueListEditor1.Row;
|
i := varList.ItemIndex;
|
||||||
ValueListEditor1.BeginUpdate;
|
varList.BeginUpdate;
|
||||||
ValueListEditor1.Clear;
|
varList.Clear;
|
||||||
arr := TJSONArray(val);
|
arr := TJSONArray(val);
|
||||||
for i := 0 to arr.Count-1 do
|
for i := 0 to arr.Count-1 do
|
||||||
begin
|
begin
|
||||||
|
@ -1900,11 +1921,13 @@ begin
|
||||||
val := obj.Find('value');
|
val := obj.Find('value');
|
||||||
if val.isNil then
|
if val.isNil then
|
||||||
continue;
|
continue;
|
||||||
ValueListEditor1.InsertRow(nme, val.AsString, false);
|
varList.AddItem(nme, nil);
|
||||||
|
with varList.Items[varList.Items.Count-1] do
|
||||||
|
SubItems.Add(val.AsString);
|
||||||
end;
|
end;
|
||||||
if (i <> -1) and (i <= ValueListEditor1.RowCount) then
|
if (i <> -1) and (i <= varList.Items.Count) then
|
||||||
ValueListEditor1.Row:=i;
|
varList.ItemIndex:=i;
|
||||||
ValueListEditor1.EndUpdate;
|
varList.EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if fOptions.showGdbOutput or fShowFromCustomCommand then
|
if fOptions.showGdbOutput or fShowFromCustomCommand then
|
||||||
|
@ -2075,9 +2098,9 @@ const
|
||||||
var
|
var
|
||||||
nme: string;
|
nme: string;
|
||||||
begin
|
begin
|
||||||
if ValueListEditor1.Row = -1 then
|
if varList.ItemIndex = -1 then
|
||||||
exit;
|
exit;
|
||||||
nme := ValueListEditor1.Keys[ValueListEditor1.Row];
|
nme := varList.Items[varList.ItemIndex].Caption;
|
||||||
gdbCommand(cmd[fAddWatchPointKind] + nme);
|
gdbCommand(cmd[fAddWatchPointKind] + nme);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -2108,11 +2131,11 @@ begin
|
||||||
doc := fDocHandler.findDocument(nme);
|
doc := fDocHandler.findDocument(nme);
|
||||||
if doc.isNotNil then
|
if doc.isNotNil then
|
||||||
doc.CaretY:= itm.line;
|
doc.CaretY:= itm.line;
|
||||||
gdbCommand('-stack-select-frame ' + intToStr(lstCallStack.ItemIndex));
|
{gdbCommand('-stack-select-frame ' + intToStr(lstCallStack.ItemIndex));
|
||||||
if fOptions.autoGetVariables then
|
if fOptions.autoGetVariables then
|
||||||
infoVariables;
|
infoVariables;
|
||||||
if fOptions.autoGetRegisters then
|
if fOptions.autoGetRegisters then
|
||||||
infoRegs;
|
infoRegs;}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEGdbWidget.mnuReadWClick(Sender: TObject);
|
procedure TCEGdbWidget.mnuReadWClick(Sender: TObject);
|
||||||
|
@ -2161,8 +2184,6 @@ end;
|
||||||
|
|
||||||
|
|
||||||
//TODO-cGDB: copy from call stack list
|
//TODO-cGDB: copy from call stack list
|
||||||
//TODO-cGDB: replace value list editor by TListView
|
|
||||||
//to set focus on variable of a triggered watchpoint.
|
|
||||||
|
|
||||||
procedure TCEGdbWidget.setGpr(reg: TCpuRegister; val: TCpuGprValue);
|
procedure TCEGdbWidget.setGpr(reg: TCpuRegister; val: TCpuGprValue);
|
||||||
const
|
const
|
||||||
|
|
Loading…
Reference in New Issue