mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 08:19:29 +02:00
FpDebug: prevent crash, if library is added twice (incorrect handling for Linux in SynchronizeProcMapsWithLibraryList)
(cherry picked from commit a6999c26a6
)
This commit is contained in:
parent
dd778f0c8d
commit
6169d36d26
@ -2787,6 +2787,10 @@ end;
|
|||||||
|
|
||||||
procedure TDbgProcess.AddLibrary(ALib: TDbgLibrary; AnID: TDbgPtr);
|
procedure TDbgProcess.AddLibrary(ALib: TDbgLibrary; AnID: TDbgPtr);
|
||||||
begin
|
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);
|
FLibMap.Add(AnID, ALib);
|
||||||
|
|
||||||
if (ALib.DbgInfo.HasInfo) or (ALib.SymbolTableInfo.HasInfo) then
|
if (ALib.DbgInfo.HasInfo) or (ALib.SymbolTableInfo.HasInfo) then
|
||||||
|
Loading…
Reference in New Issue
Block a user