mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 04:55:58 +02:00
DBG: Do not set breakpoints past end of unit. Issue #0020264 (fix, if spaces in part / do not fail if gdb returns error)
git-svn-id: trunk@32410 -
This commit is contained in:
parent
b2d943371e
commit
d65d00c3f7
@ -6956,7 +6956,7 @@ function TGDBMIDebuggerCommandBreakPointBase.ExecCheckLineInUnit(ASource: string
|
||||
ALine: Integer): Boolean;
|
||||
var
|
||||
R: TGDBMIExecResult;
|
||||
i, m: Integer;
|
||||
i, m, n: Integer;
|
||||
begin
|
||||
Result := ALine > 0;
|
||||
if not Result then exit;
|
||||
@ -6968,13 +6968,13 @@ begin
|
||||
|
||||
if ALine <= m then exit;;
|
||||
|
||||
if ExecuteCommand('info line ' + ASource + ':' + IntToStr(ALine), R)
|
||||
if ExecuteCommand('info line "' + ASource + '":' + IntToStr(ALine), R)
|
||||
and (R.State <> dsError)
|
||||
then begin
|
||||
Result :=pos('out of range', R.Values) < 1;
|
||||
end
|
||||
else
|
||||
Result := False;
|
||||
m := pos('"', R.Values); // find start of filename in messages
|
||||
n := pos('out of range', R.Values);
|
||||
Result := (n < 1) or (n >= m);
|
||||
end;
|
||||
|
||||
if not Result then exit;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user