#97, add option for gdb "non stop" mode

This commit is contained in:
Basile Burg 2016-11-30 12:25:48 +01:00
parent 5e2938c4b9
commit 33bee887bb
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 5 additions and 0 deletions

View File

@ -280,6 +280,7 @@ type
fShowRawMiOutput: boolean; fShowRawMiOutput: boolean;
fShortcuts: TCEDebugShortcuts; fShortcuts: TCEDebugShortcuts;
fAsmSyntax: TAsmSyntax; fAsmSyntax: TAsmSyntax;
fStopAllThreadsOnBreak: boolean;
procedure setIgnoredSignals(value: TStringList); procedure setIgnoredSignals(value: TStringList);
procedure setCommandsHistory(value: TStringList); procedure setCommandsHistory(value: TStringList);
procedure setShortcuts(value: TCEDebugShortcuts); procedure setShortcuts(value: TCEDebugShortcuts);
@ -297,6 +298,7 @@ type
property showGdbOutput: boolean read fShowGdbOutput write fShowGdbOutput; property showGdbOutput: boolean read fShowGdbOutput write fShowGdbOutput;
property showRawMiOutput: boolean read fShowRawMiOutput write fShowRawMiOutput; property showRawMiOutput: boolean read fShowRawMiOutput write fShowRawMiOutput;
property showOutput: boolean read fShowOutput write fShowOutput; property showOutput: boolean read fShowOutput write fShowOutput;
property stopAllThreadsOnBreak: boolean read fStopAllThreadsOnBreak write fStopAllThreadsOnBreak;
public public
constructor create(aOwner: TComponent); override; constructor create(aOwner: TComponent); override;
destructor destroy; override; destructor destroy; override;
@ -546,6 +548,7 @@ begin
fAutoDisassemble:= true; fAutoDisassemble:= true;
fAutoGetThreads:=true; fAutoGetThreads:=true;
fShowGdbOutput:=true; fShowGdbOutput:=true;
fStopAllThreadsOnBreak:= true;
fIgnoredSignals := TStringList.Create; fIgnoredSignals := TStringList.Create;
fIgnoredSignals.Duplicates:= dupIgnore; fIgnoredSignals.Duplicates:= dupIgnore;
fIgnoredSignals.Sorted:=true; fIgnoredSignals.Sorted:=true;
@ -1500,6 +1503,8 @@ begin
gdbCommand('break _d_arraybounds'); gdbCommand('break _d_arraybounds');
gdbCommand('break _d_switch_error'); gdbCommand('break _d_switch_error');
gdbCommand('-gdb-set mi-async on'); gdbCommand('-gdb-set mi-async on');
if fOptions.stopAllThreadsOnBreak then
gdbCommand('-gdb-set non-stop on');
fGdb.OnReadData := @gdboutJsonize; fGdb.OnReadData := @gdboutJsonize;
// launch // launch
cpuViewer.TIObject := fInspState; cpuViewer.TIObject := fInspState;