fpdebug: use TFPGMap instead of TStringList. Included in patch of Issue #34225 Patch by David Jenkins

git-svn-id: trunk@58892 -
This commit is contained in:
martin 2018-09-06 11:26:24 +00:00
parent a44e814975
commit ae279a0337
4 changed files with 9 additions and 8 deletions

View File

@ -5,10 +5,11 @@ unit fpDbgSymTable;
interface
uses
Classes;
DbgIntfBaseTypes,
fgl, Classes;
type
TfpSymbolList= TStringList;
TfpSymbolList= specialize TFPGMap<String, TDBGPtr>;
implementation

View File

@ -93,7 +93,7 @@ begin
i := FFpSymbolInfo.FSymbolList.IndexOf(AName);
if i > -1 then
begin
val.Address:=TDbgPtr(pointer(FFpSymbolInfo.FSymbolList.Objects[i]));
val.Address:=FFpSymbolInfo.FSymbolList.Data[i];
val.MType:=mlfTargetMem;
result := TFpDbgValueConstAddress.Create(val);
end

View File

@ -33,7 +33,7 @@ interface
uses
Classes, SysUtils,
FpImgReaderBase,
fpDbgSymTable,
fpDbgSymTable, DbgIntfBaseTypes,
FpImgReaderElfTypes, LCLProc; // these files are part of
@ -363,7 +363,7 @@ begin
if SymbolArr64^[i].st_name<>0 then
begin
SymbolName:=pchar(SymbolStr+SymbolArr64^[i].st_name);
AfpSymbolInfo.AddObject(SymbolName, TObject(PtrUInt(SymbolArr64^[i].st_value+ImageBase)));
AfpSymbolInfo.Add(SymbolName, TDbgPtr(SymbolArr64^[i].st_value+ImageBase));
end;
{$pop}
end
@ -379,7 +379,7 @@ begin
if SymbolArr32^[i].st_name<>0 then
begin
SymbolName:=pchar(SymbolStr+SymbolArr32^[i].st_name);
AfpSymbolInfo.AddObject(SymbolName, TObject(PtrUInt(SymbolArr32^[i].st_value+ImageBase)));
AfpSymbolInfo.Add(SymbolName, TDBGPtr(SymbolArr32^[i].st_value+ImageBase));
end;
end
end;

View File

@ -40,7 +40,7 @@ interface
uses
Classes, SysUtils, math, FpImgReaderBase, FpImgReaderWinPETypes, LazLoggerBase,
fpDbgSymTable;
fpDbgSymTable, DbgIntfBaseTypes;
type
@ -152,7 +152,7 @@ begin
end;
end;
end;
AfpSymbolInfo.AddObject(SymbolName, TObject(PtrUInt(SymbolArr^[i].Value+ImageBase+FCodeBase)));
AfpSymbolInfo.Add(SymbolName, TDBGPtr(SymbolArr^[i].Value+ImageBase+FCodeBase));
end
end;
{$POP}