mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 06:39:12 +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;
|
ALine: Integer): Boolean;
|
||||||
var
|
var
|
||||||
R: TGDBMIExecResult;
|
R: TGDBMIExecResult;
|
||||||
i, m: Integer;
|
i, m, n: Integer;
|
||||||
begin
|
begin
|
||||||
Result := ALine > 0;
|
Result := ALine > 0;
|
||||||
if not Result then exit;
|
if not Result then exit;
|
||||||
@ -6968,13 +6968,13 @@ begin
|
|||||||
|
|
||||||
if ALine <= m then exit;;
|
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)
|
and (R.State <> dsError)
|
||||||
then begin
|
then begin
|
||||||
Result :=pos('out of range', R.Values) < 1;
|
m := pos('"', R.Values); // find start of filename in messages
|
||||||
end
|
n := pos('out of range', R.Values);
|
||||||
else
|
Result := (n < 1) or (n >= m);
|
||||||
Result := False;
|
end;
|
||||||
|
|
||||||
if not Result then exit;
|
if not Result then exit;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user