FpDebug: fix warnings.

This commit is contained in:
Martin 2022-03-21 04:30:11 +01:00
parent 22ef2d781f
commit 4f8efdd21f
4 changed files with 12 additions and 10 deletions

View File

@ -1364,7 +1364,7 @@ begin
dec(i); dec(i);
if i = 0 then begin if i = 0 then begin
DebugLn(FPDBG_DWARF_WARNINGS, ['ENDLESS LEB128']); DebugLn(FPDBG_DWARF_WARNINGS, ['ENDLESS LEB128']);
exit; exit(nil);
end; end;
end; end;
Result := LEB128 + 1; Result := LEB128 + 1;

View File

@ -222,7 +222,9 @@ end;
function TDbgImageLoader.GetReaderErrors: String; function TDbgImageLoader.GetReaderErrors: String;
begin begin
if FImgReader <> nil then if FImgReader <> nil then
Result := FImgReader.ReaderErrors; Result := FImgReader.ReaderErrors
else
Result := '';
end; end;
function TDbgImageLoader.GetSubFiles: TStrings; function TDbgImageLoader.GetSubFiles: TStrings;

View File

@ -191,7 +191,7 @@ begin
end; end;
end end
else else
DebugLn('File with debug-info "'+DwarfDebugMap.ObjectFile+'" does not exist. This could lead to missing debug-information.'); DebugLn('File with debug-info "'+ASubFiles[i]+'" does not exist. This could lead to missing debug-information.');
end; end;
end; end;
end; end;

View File

@ -95,8 +95,8 @@ type
FCallstackEntry: TCallStackEntry; FCallstackEntry: TCallStackEntry;
procedure DoCallstackFreed_DecRef(Sender: TObject); procedure DoCallstackFreed_DecRef(Sender: TObject);
procedure DoCallstackEntryFreed_DecRef(Sender: TObject); procedure DoCallstackEntryFreed_DecRef(Sender: TObject);
procedure DoRemovedFromLinkedList; override;
protected protected
procedure DoRemovedFromLinkedList; override;
procedure UpdateCallstackEntry_DecRef(Data: PtrInt = 0); override; procedure UpdateCallstackEntry_DecRef(Data: PtrInt = 0); override;
public public
constructor Create(ADebugger: TFpDebugDebuggerBase; AThread: TDbgThread; ACallstackEntry: TCallStackEntry; ACallstack: TCallStackBase = nil); constructor Create(ADebugger: TFpDebugDebuggerBase; AThread: TDbgThread; ACallstackEntry: TCallStackEntry; ACallstack: TCallStackBase = nil);
@ -4247,13 +4247,13 @@ function TFpDebugDebugger.GetLocationRec(AnAddress: TDBGPtr;
var var
sym, symproc: TFpSymbol; sym, symproc: TFpSymbol;
begin begin
result.FuncName:='';
result.SrcFile:='';
result.SrcFullName:='';
result.SrcLine:=0;
if Assigned(FDbgController.CurrentProcess) then if Assigned(FDbgController.CurrentProcess) then
begin begin
result.FuncName:='';
result.SrcFile:='';
result.SrcFullName:='';
result.SrcLine:=0;
if AnAddress=0 then if AnAddress=0 then
result.Address := FDbgController.DefaultContext.Address // DefaultContext has the InstrPtr cached result.Address := FDbgController.DefaultContext.Address // DefaultContext has the InstrPtr cached
//result.Address := FDbgController.CurrentThread.GetInstructionPointerRegisterValue //result.Address := FDbgController.CurrentThread.GetInstructionPointerRegisterValue
@ -4277,7 +4277,7 @@ begin
if assigned(symproc) then if assigned(symproc) then
result.FuncName:=symproc.Name; result.FuncName:=symproc.Name;
sym.ReleaseReference; sym.ReleaseReference;
end end;
end; end;
function TFpDebugDebugger.GetLocation: TDBGLocationRec; function TFpDebugDebugger.GetLocation: TDBGLocationRec;