mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 05:00:25 +02:00
FpDebug: add workaround to prevent the IDE from creating empty/wrong Dbg-LineMaps (mapping all lines to zero)
This commit is contained in:
parent
04b384b34d
commit
0278edaea3
@ -2492,8 +2492,20 @@ begin
|
||||
end;
|
||||
|
||||
function TFpLineInfo.IndexOf(const ASource: String): integer;
|
||||
var
|
||||
Src: String;
|
||||
begin
|
||||
Result := FRequestedSources.IndexOf(ASource);
|
||||
(* For dsInit, dsPause:
|
||||
- DebugManager.DebuggerChangeState calls SourceEditorManager.FillExecutionMarks;
|
||||
- This happens, even if the data is not available.
|
||||
- TSourceEditor.FillExecutionMarks will call this function ("IndexOf") and create an
|
||||
empty non-functional map.
|
||||
(Happens for libraries, loaded with LoadLibrary during dsInit, if the source is open)
|
||||
- To avoid this => return -1
|
||||
*)
|
||||
if (Result >= 0) and (FRequestedSources.Objects[Result] = nil) then
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
procedure TFpLineInfo.Request(const ASource: String);
|
||||
|
Loading…
Reference in New Issue
Block a user