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);
if i = 0 then begin
DebugLn(FPDBG_DWARF_WARNINGS, ['ENDLESS LEB128']);
exit;
exit(nil);
end;
end;
Result := LEB128 + 1;

View File

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

View File

@ -191,7 +191,7 @@ begin
end;
end
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;

View File

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