#97, next & step, add dropdown to set if cmd is applied at src or hwd level

This commit is contained in:
Basile Burg 2016-11-28 04:33:33 +01:00
parent 9eda998779
commit 0d76b2250b
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
2 changed files with 42 additions and 13 deletions

View File

@ -3,6 +3,7 @@ inherited CEGdbWidget: TCEGdbWidget
Height = 668
Top = 333
Width = 517
ActiveControl = Splitter2
Caption = 'GDB commander'
ClientHeight = 668
ClientWidth = 517
@ -251,6 +252,7 @@ inherited CEGdbWidget: TCEGdbWidget
Top = 0
Width = 509
Align = alClient
AutoWidthLastColumn = True
Columns = <
item
AutoSize = True
@ -283,7 +285,6 @@ inherited CEGdbWidget: TCEGdbWidget
Width = 64
end
item
AutoSize = True
Caption = 'line'
Width = 200
end>
@ -299,7 +300,7 @@ inherited CEGdbWidget: TCEGdbWidget
inherited toolbar: TCEToolBar
Width = 509
object btnStack: TCEToolButton[0]
Left = 225
Left = 249
Hint = 'view call stack'
Top = 0
Caption = 'btnStack'
@ -308,7 +309,7 @@ inherited CEGdbWidget: TCEGdbWidget
scaledSeparator = False
end
object btnReg: TCEToolButton[1]
Left = 197
Left = 221
Hint = 'update CPU registers values'
Top = 0
Caption = 'btnReg'
@ -317,7 +318,7 @@ inherited CEGdbWidget: TCEGdbWidget
scaledSeparator = False
end
object button4: TCEToolButton[2]
Left = 181
Left = 205
Height = 28
Top = 0
Width = 16
@ -357,21 +358,25 @@ inherited CEGdbWidget: TCEGdbWidget
Hint = 'step to next instruction, including in calls'
Top = 0
Caption = 'btnNext'
DropdownMenu = mnuNext
OnClick = btnNextClick
Style = tbsDropDown
resourceName = 'GO_DOWN'
scaledSeparator = False
end
object btnOver: TCEToolButton[7]
Left = 153
Left = 165
Hint = 'step to the next instruction, excluding calls'
Top = 0
Caption = 'btnOver'
DropdownMenu = mnuStep
OnClick = btnOverClick
Style = tbsDropDown
resourceName = 'GO_JUMP'
scaledSeparator = False
end
object btnVariables: TCEToolButton[8]
Left = 253
Left = 277
Hint = 'update variables list'
Top = 0
Caption = 'btnVariables'
@ -391,7 +396,7 @@ inherited CEGdbWidget: TCEGdbWidget
scaledSeparator = False
end
object btnWatch: TCEToolButton[10]
Left = 281
Left = 305
Hint = 'add a watchpoint for the variable selected in the list'
Top = 0
Caption = 'btnWatch'
@ -417,8 +422,8 @@ inherited CEGdbWidget: TCEGdbWidget
top = 64
end
object mnuProjRunnable: TPopupMenu[3]
left = 144
top = 64
left = 56
top = 112
object mnuSelProj: TMenuItem
AutoCheck = True
Caption = 'Debug project'
@ -432,8 +437,8 @@ inherited CEGdbWidget: TCEGdbWidget
end
end
object mnuWatch: TPopupMenu[4]
left = 144
top = 128
left = 56
top = 160
object mnuReadW: TMenuItem
AutoCheck = True
Caption = 'On read'
@ -451,4 +456,20 @@ inherited CEGdbWidget: TCEGdbWidget
OnClick = mnuReadWriteWClick
end
end
object mnuNext: TPopupMenu[5]
left = 152
top = 112
object mnuNextMachine: TMenuItem
AutoCheck = True
Caption = 'machine instruction'
end
end
object mnuStep: TPopupMenu[6]
left = 152
top = 160
object mnuStepMachine: TMenuItem
AutoCheck = True
Caption = 'machine instruction'
end
end
end

View File

@ -334,8 +334,12 @@ type
Edit1: TComboBox;
GroupBox3: TGroupBox;
lstThreads: TListView;
mnuNextMachine: TMenuItem;
mnuStepMachine: TMenuItem;
mnuStep: TPopupMenu;
PageControl1: TPageControl;
PageControl2: TPageControl;
mnuNext: TPopupMenu;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
TabSheet3: TTabSheet;
@ -2217,15 +2221,19 @@ begin
end;
procedure TCEGdbWidget.btnNextClick(Sender: TObject);
const
cmd: array[boolean] of string = ('-exec-step','-exec-step-instruction');
begin
gdbCommand('step', @gdboutJsonize);
gdbCommand(cmd[mnuNextMachine.Checked], @gdboutJsonize);
if assigned(fGdb) and fgdb.Running then
setState(gsRunning);
end;
procedure TCEGdbWidget.btnOverClick(Sender: TObject);
const
cmd: array[boolean] of string = ('-exec-next','-exec-next-instruction');
begin
gdbCommand('next', @gdboutJsonize);
gdbCommand(cmd[mnuStepMachine.Checked], @gdboutJsonize);
if assigned(fGdb) and fgdb.Running then
setState(gsRunning);
end;