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

(cherry picked from commit a6999c26a6)
This commit is contained in:
Martin 2023-10-14 13:45:26 +02:00
parent dd778f0c8d
commit 6169d36d26

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