mirror of https://gitlab.com/basile.b/dexed.git
fix #197 - GDB sync issues due to non stop mode
This commit is contained in:
parent
e1288094ab
commit
debbe9001c
|
@ -1481,12 +1481,7 @@ var
|
||||||
i: integer = 0;
|
i: integer = 0;
|
||||||
begin
|
begin
|
||||||
while not fCommandProcessed do
|
while not fCommandProcessed do
|
||||||
begin
|
|
||||||
application.ProcessMessages;
|
application.ProcessMessages;
|
||||||
i += 1;
|
|
||||||
if i = high(integer) then
|
|
||||||
i := 0;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEGdbWidget.addBreakPoint(const fname: string; line: integer;
|
procedure TCEGdbWidget.addBreakPoint(const fname: string; line: integer;
|
||||||
|
@ -1514,6 +1509,7 @@ begin
|
||||||
begin
|
begin
|
||||||
fSilentPause := true;
|
fSilentPause := true;
|
||||||
gdbCommand('-exec-continue --all', @gdboutJsonize);
|
gdbCommand('-exec-continue --all', @gdboutJsonize);
|
||||||
|
waitCommandProcessed;
|
||||||
fSilentPause := false;
|
fSilentPause := false;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -1541,6 +1537,7 @@ begin
|
||||||
begin
|
begin
|
||||||
fSilentPause := true;
|
fSilentPause := true;
|
||||||
gdbCommand('-exec-continue --all', @gdboutJsonize);
|
gdbCommand('-exec-continue --all', @gdboutJsonize);
|
||||||
|
waitCommandProcessed;
|
||||||
fSilentPause := false;
|
fSilentPause := false;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -1759,10 +1756,10 @@ 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 not fOptions.stopAllThreadsOnBreak then
|
if fOptions.stopAllThreadsOnBreak then
|
||||||
gdbCommand('-gdb-set non-stop on')
|
gdbCommand('-gdb-set non-stop off')
|
||||||
else
|
else
|
||||||
gdbCommand('-gdb-set non-stop off');
|
gdbCommand('-gdb-set non-stop on');
|
||||||
fGdb.OnReadData := @gdboutJsonize;
|
fGdb.OnReadData := @gdboutJsonize;
|
||||||
cpuViewer.TIObject := fInspState;
|
cpuViewer.TIObject := fInspState;
|
||||||
cpuViewer.RefreshPropertyValues;
|
cpuViewer.RefreshPropertyValues;
|
||||||
|
@ -2408,7 +2405,6 @@ procedure TCEGdbWidget.gdboutJsonize(sender: TObject);
|
||||||
var
|
var
|
||||||
str: string;
|
str: string;
|
||||||
begin
|
begin
|
||||||
fCommandProcessed := true;
|
|
||||||
if fMsg = nil then
|
if fMsg = nil then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
@ -2418,6 +2414,8 @@ begin
|
||||||
for str in fLog do
|
for str in fLog do
|
||||||
fMsg.message(str, nil, amcMisc, amkAuto);
|
fMsg.message(str, nil, amcMisc, amkAuto);
|
||||||
|
|
||||||
|
fCommandProcessed := true;
|
||||||
|
|
||||||
if flog.Text.isEmpty then
|
if flog.Text.isEmpty then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue