mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 23:49:07 +02:00
+ adapted TOmfObjSymbol.AddressStr to show correct segment:offset for NewExe files as well
git-svn-id: trunk@42567 -
This commit is contained in:
parent
b739d79f9b
commit
2c176be2fd
@ -597,6 +597,10 @@ implementation
|
|||||||
function TOmfObjSymbol.AddressStr(AImageBase: qword): string;
|
function TOmfObjSymbol.AddressStr(AImageBase: qword): string;
|
||||||
var
|
var
|
||||||
base: qword;
|
base: qword;
|
||||||
|
begin
|
||||||
|
if assigned(objsection.ExeSection) and (objsection.ExeSection is TNewExeSection) then
|
||||||
|
Result:=HexStr(TNewExeSection(objsection.ExeSection).MemBasePos,4)+':'+HexStr(address,4)
|
||||||
|
else
|
||||||
begin
|
begin
|
||||||
if assigned(TOmfObjSection(objsection).MZExeUnifiedLogicalSegment) then
|
if assigned(TOmfObjSection(objsection).MZExeUnifiedLogicalSegment) then
|
||||||
base:=TOmfObjSection(objsection).MZExeUnifiedLogicalSegment.MemBasePos
|
base:=TOmfObjSection(objsection).MZExeUnifiedLogicalSegment.MemBasePos
|
||||||
@ -604,6 +608,7 @@ implementation
|
|||||||
base:=(address shr 4) shl 4;
|
base:=(address shr 4) shl 4;
|
||||||
Result:=HexStr(base shr 4,4)+':'+HexStr(address-base,4);
|
Result:=HexStr(base shr 4,4)+':'+HexStr(address-base,4);
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TOmfRelocation
|
TOmfRelocation
|
||||||
|
Loading…
Reference in New Issue
Block a user