mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 15:40:41 +02:00
FpDebug: Fixed uninitialized variables.
This commit is contained in:
parent
d233f9981f
commit
8335731953
@ -1691,7 +1691,7 @@ end;
|
|||||||
|
|
||||||
function TDbgInstance.EnclosesAddress(AnAddress: TDBGPtr): Boolean;
|
function TDbgInstance.EnclosesAddress(AnAddress: TDBGPtr): Boolean;
|
||||||
begin
|
begin
|
||||||
EnclosesAddressRange(AnAddress, AnAddress);
|
Result := EnclosesAddressRange(AnAddress, AnAddress);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDbgInstance.EnclosesAddressRange(AStartAddress, AnEndAddress: TDBGPtr): Boolean;
|
function TDbgInstance.EnclosesAddressRange(AStartAddress, AnEndAddress: TDBGPtr): Boolean;
|
||||||
@ -1931,7 +1931,7 @@ var
|
|||||||
sym: TFpSymbol;
|
sym: TFpSymbol;
|
||||||
begin
|
begin
|
||||||
Result := nil;
|
Result := nil;
|
||||||
Ctx := TFpDbgSimpleLocationContext.Create(MemManager, Addr, DBGPTRSIZE[Mode], AThreadId, AStackFrame);
|
Ctx := nil;
|
||||||
|
|
||||||
if GetThread(AThreadId, Thread) then begin
|
if GetThread(AThreadId, Thread) then begin
|
||||||
Thread.PrepareCallStackEntryList(AStackFrame + 1);
|
Thread.PrepareCallStackEntryList(AStackFrame + 1);
|
||||||
@ -1940,12 +1940,13 @@ begin
|
|||||||
Frame := Thread.CallStackEntryList[AStackFrame];
|
Frame := Thread.CallStackEntryList[AStackFrame];
|
||||||
|
|
||||||
if Frame <> nil then begin
|
if Frame <> nil then begin
|
||||||
|
Addr := Frame.AnAddress;
|
||||||
|
Ctx := TFpDbgSimpleLocationContext.Create(MemManager, Addr, DBGPTRSIZE[Mode], AThreadId, AStackFrame);
|
||||||
sym := Frame.ProcSymbol;
|
sym := Frame.ProcSymbol;
|
||||||
if sym <> nil then
|
if sym <> nil then
|
||||||
Result := sym.CreateSymbolScope(Ctx);
|
Result := sym.CreateSymbolScope(Ctx);
|
||||||
|
|
||||||
if Result = nil then begin
|
if Result = nil then begin
|
||||||
Addr := Frame.AnAddress;
|
|
||||||
if (Addr <> 0) or (FDbgInfo.TargetInfo.machineType = mtAVR8) then
|
if (Addr <> 0) or (FDbgInfo.TargetInfo.machineType = mtAVR8) then
|
||||||
Result := FDbgInfo.FindSymbolScope(Ctx, Addr);
|
Result := FDbgInfo.FindSymbolScope(Ctx, Addr);
|
||||||
end;
|
end;
|
||||||
@ -1955,8 +1956,11 @@ begin
|
|||||||
// SymbolTableInfo.FindSymbolScope()
|
// SymbolTableInfo.FindSymbolScope()
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if Result = nil then
|
if Result = nil then begin
|
||||||
|
if Ctx = nil then
|
||||||
|
Ctx := TFpDbgSimpleLocationContext.Create(MemManager, 0, DBGPTRSIZE[Mode], AThreadId, AStackFrame);
|
||||||
Result := TFpDbgSymbolScope.Create(Ctx);
|
Result := TFpDbgSymbolScope.Create(Ctx);
|
||||||
|
end;
|
||||||
|
|
||||||
Ctx.ReleaseReference;
|
Ctx.ReleaseReference;
|
||||||
end;
|
end;
|
||||||
|
@ -130,7 +130,7 @@ type
|
|||||||
FIdleThreadCount: integer;
|
FIdleThreadCount: integer;
|
||||||
function GetRtlEvent: PRTLEvent;
|
function GetRtlEvent: PRTLEvent;
|
||||||
procedure FreeRtrEvent(AnEvent: PRTLEvent);
|
procedure FreeRtrEvent(AnEvent: PRTLEvent);
|
||||||
function RemoveThread(Item: TFpWorkerThread): Integer;
|
procedure RemoveThread(Item: TFpWorkerThread);
|
||||||
property WantedCount: Integer read GetWantedCount;
|
property WantedCount: Integer read GetWantedCount;
|
||||||
property CurrentCount: Integer read GetCurrentCount;
|
property CurrentCount: Integer read GetCurrentCount;
|
||||||
property ThreadMonitor: TLazMonitor read FThreadMonitor;
|
property ThreadMonitor: TLazMonitor read FThreadMonitor;
|
||||||
@ -978,7 +978,7 @@ begin
|
|||||||
RTLEventDestroy(AnEvent);
|
RTLEventDestroy(AnEvent);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFpThreadWorkerQueue.RemoveThread(Item: TFpWorkerThread): Integer;
|
procedure TFpThreadWorkerQueue.RemoveThread(Item: TFpWorkerThread);
|
||||||
begin
|
begin
|
||||||
FThreadMonitor.Enter;
|
FThreadMonitor.Enter;
|
||||||
try
|
try
|
||||||
|
Loading…
Reference in New Issue
Block a user