mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 05:49:15 +02:00
Lldb/Gdb - FpDebug: fix crash in pretty printer when called from lldb/gdb mixed debugger (MemManager not set)
git-svn-id: trunk@59443 -
This commit is contained in:
parent
f07c210185
commit
9b2f44b8c8
@ -680,7 +680,10 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
exit;
|
||||
end;
|
||||
|
||||
Cache := MemManager.CacheManager.AddCache(AValue.DataAddress.Address, AValue.DataSize);
|
||||
if (MemManager <> nil) and (MemManager.CacheManager <> nil) then
|
||||
Cache := MemManager.CacheManager.AddCache(AValue.DataAddress.Address, AValue.DataSize)
|
||||
else
|
||||
Cache := nil;
|
||||
try
|
||||
|
||||
if (ppvCreateDbgType in AFlags) then begin
|
||||
@ -764,7 +767,8 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
APrintedValue := '(' + APrintedValue + ')';
|
||||
Result := True;
|
||||
finally
|
||||
MemManager.CacheManager.RemoveCache(Cache)
|
||||
if Cache <> nil then
|
||||
MemManager.CacheManager.RemoveCache(Cache)
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -276,6 +276,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
FpDebugger.FPrettyPrinter.AddressSize := ctx.SizeOfAddress;
|
||||
FpDebugger.FPrettyPrinter.MemManager := ctx.MemManager;
|
||||
|
||||
ALocals.Clear;
|
||||
for i := 0 to ProcVal.MemberCount - 1 do begin
|
||||
|
@ -285,6 +285,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
FpDebugger.FPrettyPrinter.AddressSize := ctx.SizeOfAddress;
|
||||
FpDebugger.FPrettyPrinter.MemManager := ctx.MemManager;
|
||||
|
||||
ALocals.Clear;
|
||||
for i := 0 to ProcVal.MemberCount - 1 do begin
|
||||
|
Loading…
Reference in New Issue
Block a user