#97, prevent invalid disasm when stepping during finalization

This commit is contained in:
Basile Burg 2016-11-28 23:24:05 +01:00
parent 555ed94e56
commit 6367a87a21
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
2 changed files with 14 additions and 5 deletions

View File

@ -83,6 +83,7 @@ inherited CEGdbWidget: TCEGdbWidget
Top = 24 Top = 24
Width = 505 Width = 505
Align = alClient Align = alClient
AutoWidthLastColumn = True
BorderSpacing.Around = 2 BorderSpacing.Around = 2
Columns = < Columns = <
item item
@ -91,7 +92,6 @@ inherited CEGdbWidget: TCEGdbWidget
Width = 46 Width = 46
end end
item item
AutoSize = True
Caption = 'value' Caption = 'value'
Width = 455 Width = 455
end> end>
@ -130,6 +130,7 @@ inherited CEGdbWidget: TCEGdbWidget
Width = 505 Width = 505
Align = alClient Align = alClient
AutoSort = False AutoSort = False
AutoWidthLastColumn = True
BorderSpacing.Around = 2 BorderSpacing.Around = 2
Columns = < Columns = <
item item
@ -138,7 +139,6 @@ inherited CEGdbWidget: TCEGdbWidget
Width = 59 Width = 59
end end
item item
AutoSize = True
Caption = 'instruction' Caption = 'instruction'
Width = 442 Width = 442
end> end>
@ -217,6 +217,8 @@ inherited CEGdbWidget: TCEGdbWidget
Top = 0 Top = 0
Width = 509 Width = 509
Align = alClient Align = alClient
AutoSort = False
AutoWidthLastColumn = True
Columns = < Columns = <
item item
AutoSize = True AutoSize = True
@ -229,12 +231,12 @@ inherited CEGdbWidget: TCEGdbWidget
Width = 59 Width = 59
end end
item item
AutoSize = True
Caption = 'filename' Caption = 'filename'
Width = 367 Width = 384
end> end>
GridLines = True GridLines = True
ReadOnly = True ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 0 TabOrder = 0
ViewStyle = vsReport ViewStyle = vsReport
OnDblClick = lstCallStackDblClick OnDblClick = lstCallStackDblClick
@ -251,6 +253,7 @@ inherited CEGdbWidget: TCEGdbWidget
Top = 0 Top = 0
Width = 509 Width = 509
Align = alClient Align = alClient
AutoSort = False
AutoWidthLastColumn = True AutoWidthLastColumn = True
Columns = < Columns = <
item item
@ -285,10 +288,11 @@ inherited CEGdbWidget: TCEGdbWidget
end end
item item
Caption = 'line' Caption = 'line'
Width = 200 Width = 217
end> end>
GridLines = True GridLines = True
ReadOnly = True ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 0 TabOrder = 0
ViewStyle = vsReport ViewStyle = vsReport
OnDblClick = lstThreadsDblClick OnDblClick = lstThreadsDblClick

View File

@ -1319,6 +1319,7 @@ begin
btnReg.Enabled:=false; btnReg.Enabled:=false;
btnVariables.Enabled:=false; btnVariables.Enabled:=false;
btnStack.Enabled:=false; btnStack.Enabled:=false;
btnWatch.Enabled:=false;
clearDisplays; clearDisplays;
end; end;
gsPaused: gsPaused:
@ -1332,6 +1333,7 @@ begin
btnReg.Enabled:=true; btnReg.Enabled:=true;
btnVariables.Enabled:=true; btnVariables.Enabled:=true;
btnStack.Enabled:=true; btnStack.Enabled:=true;
btnWatch.Enabled:=true;
end; end;
gsRunning: gsRunning:
begin begin
@ -1344,6 +1346,7 @@ begin
btnReg.Enabled:=false; btnReg.Enabled:=false;
btnVariables.Enabled:=false; btnVariables.Enabled:=false;
btnStack.Enabled:=false; btnStack.Enabled:=false;
btnWatch.Enabled:=false;
end; end;
end; end;
end; end;
@ -2217,6 +2220,8 @@ procedure TCEGdbWidget.infoAsm(const fname: string);
var var
cmd: string; cmd: string;
begin begin
if not fname.fileExists or (fLastLine = '-1') or (fLastLine = '0') then
exit;
cmd := format('-data-disassemble -f %s -l %s -n -1 -- 0', [fname, fLastLine]); cmd := format('-data-disassemble -f %s -l %s -n -1 -- 0', [fname, fLastLine]);
//cmd := format('-data-disassemble -s %s -e $pc -- 0', [fLastOffset]); //cmd := format('-data-disassemble -s %s -e $pc -- 0', [fLastOffset]);
gdbCommand(cmd, @gdboutJsonize); gdbCommand(cmd, @gdboutJsonize);