From f88d32abdc43b26be4c4f376a92c6cdf542c9a00 Mon Sep 17 00:00:00 2001 From: maxim Date: Tue, 21 Feb 2017 21:44:06 +0000 Subject: [PATCH] Merged revision(s) 54215 #b694bd2d46 from trunk: Debugger: fix for gdb 7.12 issue #0031386 / patch by Cyrax ........ git-svn-id: branches/fixes_1_6@54240 - --- components/lazdebuggergdbmi/gdbmidebugger.pp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/components/lazdebuggergdbmi/gdbmidebugger.pp b/components/lazdebuggergdbmi/gdbmidebugger.pp index 3297fba340..cfe3983143 100644 --- a/components/lazdebuggergdbmi/gdbmidebugger.pp +++ b/components/lazdebuggergdbmi/gdbmidebugger.pp @@ -4966,6 +4966,14 @@ function TGDBMIDebuggerCommandStartDebugging.DoExecute: Boolean; if TargetInfo^.TargetPID <> 0 then exit; 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 if ExecuteCommand('info threads', [], R, [cfCheckState]) and (R.State <> dsError) then begin @@ -4974,7 +4982,7 @@ function TGDBMIDebuggerCommandStartDebugging.DoExecute: Boolean; if TargetInfo^.TargetPID <> 0 then exit; // returned by gdb server (maybe others) - s := GetPart(['Thread '], [' '], R.Values, True); + s := GetPart(['Thread '], [' ', '.'], R.Values, True); TargetInfo^.TargetPID := StrToIntDef(s, 0); if TargetInfo^.TargetPID <> 0 then exit; end;