mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-22 05:09:39 +01:00
FPDebug: deal with on debug loader found
git-svn-id: trunk@43248 -
This commit is contained in:
parent
d94a996d71
commit
e39906a6d2
@ -68,6 +68,7 @@ type
|
||||
constructor Create(AFileHandle: THandle);
|
||||
{$endif}
|
||||
destructor Destroy; override;
|
||||
function IsValid: Boolean;
|
||||
property ImageBase: QWord read FImageBase; unimplemented;
|
||||
Property Image64Bit: Boolean read FImage64Bit; unimplemented;
|
||||
property Section[const AName: String]: PDbgImageSection read GetSection;
|
||||
@ -81,7 +82,10 @@ implementation
|
||||
|
||||
function TDbgImageLoader.GetSection(const AName: String): PDbgImageSection;
|
||||
begin
|
||||
Result := FImgReader.Section[AName];
|
||||
if FImgReader <> nil then
|
||||
Result := FImgReader.Section[AName]
|
||||
else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
constructor TDbgImageLoader.Create;
|
||||
@ -109,5 +113,10 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TDbgImageLoader.IsValid: Boolean;
|
||||
begin
|
||||
Result := FImgReader <> nil;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
||||
@ -376,6 +376,10 @@ begin
|
||||
UnLoadDwarf;
|
||||
debugln(['TFpGDBMIDebugger.LoadDwarf ']);
|
||||
FImageLoader := TDbgImageLoader.Create(FileName);
|
||||
if not FImageLoader.IsValid then begin
|
||||
FreeAndNil(FImageLoader);
|
||||
exit;
|
||||
end;;
|
||||
FDwarfInfo := TDbgDwarf.Create(FImageLoader);
|
||||
FDwarfInfo.LoadCompilationUnits;
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user