FpGDBMIDbg: updated for fpdbg changes

git-svn-id: trunk@42896 -
This commit is contained in:
martin 2013-09-20 09:19:20 +00:00
parent 3b717ddda1
commit 0c327b42bc

View File

@ -6,7 +6,7 @@ interface
uses uses
Classes, sysutils, GDBMIDebugger, BaseDebugManager, Debugger, Classes, sysutils, GDBMIDebugger, BaseDebugManager, Debugger,
GDBMIMiscClasses, maps, FpDbgLoader, FpDbgDwarf, LazLoggerBase; GDBMIMiscClasses, maps, FpDbgLoader, FpDbgDwarf, LazLoggerBase, LazLoggerProfiling;
type type
@ -99,15 +99,15 @@ end;
function TFpGDBMILineInfo.GetAddress(const AIndex: Integer; const ALine: Integer): TDbgPtr; function TFpGDBMILineInfo.GetAddress(const AIndex: Integer; const ALine: Integer): TDbgPtr;
var var
Map: TMap; Map: PDWarfLineMap;
begin begin
Result := 0; Result := 0;
if not FpDebugger.HasDwarf then if not FpDebugger.HasDwarf then
exit; exit;
//Result := FpDebugger.FDwarfInfo.GetLineAddress(FRequestedSources[AIndex], ALine); //Result := FpDebugger.FDwarfInfo.GetLineAddress(FRequestedSources[AIndex], ALine);
Map := TMap(FRequestedSources.Objects[AIndex]); Map := PDWarfLineMap(FRequestedSources.Objects[AIndex]);
if Map <> nil then if Map <> nil then
Map.GetData(ALine, Result); Result := Map^.GetAddressForLine(ALine);
end; end;
function TFpGDBMILineInfo.GetInfo(AAdress: TDbgPtr; out ASource, ALine, function TFpGDBMILineInfo.GetInfo(AAdress: TDbgPtr; out ASource, ALine,
@ -130,7 +130,7 @@ procedure TFpGDBMILineInfo.Request(const ASource: String);
begin begin
if not FpDebugger.HasDwarf then if not FpDebugger.HasDwarf then
exit; exit;
FRequestedSources.AddObject(ASource, FpDebugger.FDwarfInfo.GetLineAddressMap(ASource)); FRequestedSources.AddObject(ASource, TObject(FpDebugger.FDwarfInfo.GetLineAddressMap(ASource)));
DoChange(ASource); DoChange(ASource);
end; end;