mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 06:39:13 +02:00
Debugger: fix for gdb 7.12 issue #0031386 / patch by Cyrax
git-svn-id: trunk@54215 -
This commit is contained in:
parent
196ad90a03
commit
b694bd2d46
@ -4988,6 +4988,14 @@ function TGDBMIDebuggerCommandStartDebugging.DoExecute: Boolean;
|
|||||||
if TargetInfo^.TargetPID <> 0 then exit;
|
if TargetInfo^.TargetPID <> 0 then exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// gdb server
|
||||||
|
if ExecuteCommand('info proc', [], R, [cfCheckState]) and (R.State <> dsError)
|
||||||
|
then begin
|
||||||
|
s := GetPart(['process '], [#10,#13#10], R.Values, True);
|
||||||
|
TargetInfo^.TargetPID := StrToIntDef(s, 0);
|
||||||
|
if TargetInfo^.TargetPID <> 0 then exit;
|
||||||
|
end;
|
||||||
|
|
||||||
// apple / MacPort 7.1 / 32 bit dwarf
|
// apple / MacPort 7.1 / 32 bit dwarf
|
||||||
if ExecuteCommand('info threads', [], R, [cfCheckState]) and (R.State <> dsError)
|
if ExecuteCommand('info threads', [], R, [cfCheckState]) and (R.State <> dsError)
|
||||||
then begin
|
then begin
|
||||||
@ -4996,7 +5004,7 @@ function TGDBMIDebuggerCommandStartDebugging.DoExecute: Boolean;
|
|||||||
if TargetInfo^.TargetPID <> 0 then exit;
|
if TargetInfo^.TargetPID <> 0 then exit;
|
||||||
|
|
||||||
// returned by gdb server (maybe others)
|
// returned by gdb server (maybe others)
|
||||||
s := GetPart(['Thread '], [' '], R.Values, True);
|
s := GetPart(['Thread '], [' ', '.'], R.Values, True);
|
||||||
TargetInfo^.TargetPID := StrToIntDef(s, 0);
|
TargetInfo^.TargetPID := StrToIntDef(s, 0);
|
||||||
if TargetInfo^.TargetPID <> 0 then exit;
|
if TargetInfo^.TargetPID <> 0 then exit;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user