FpDebug: prevent crash, if library is added twice (incorrect handling for Linux in SynchronizeProcMapsWithLibraryList)

This commit is contained in:
Martin 2023-10-14 13:45:26 +02:00
parent 1db2f6aab4
commit a6999c26a6

View File

@ -2787,6 +2787,10 @@ end;
procedure TDbgProcess.AddLibrary(ALib: TDbgLibrary; AnID: TDbgPtr);
begin
if FLibMap.HasId(AnID) then begin
debugln(DBG_VERBOSE or DBG_WARNINGS, ['Error: Attempt to add duplicate library ', AnID]);
exit;
end;
FLibMap.Add(AnID, ALib);
if (ALib.DbgInfo.HasInfo) or (ALib.SymbolTableInfo.HasInfo) then