From 2c176be2fd61a5da4520b9ba74e6d4de0e4e3a4a Mon Sep 17 00:00:00 2001 From: nickysn Date: Fri, 2 Aug 2019 22:47:44 +0000 Subject: [PATCH] + adapted TOmfObjSymbol.AddressStr to show correct segment:offset for NewExe files as well git-svn-id: trunk@42567 - --- compiler/ogomf.pas | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/compiler/ogomf.pas b/compiler/ogomf.pas index 6e140943a4..0d16745fdb 100644 --- a/compiler/ogomf.pas +++ b/compiler/ogomf.pas @@ -598,11 +598,16 @@ implementation var base: qword; begin - if assigned(TOmfObjSection(objsection).MZExeUnifiedLogicalSegment) then - base:=TOmfObjSection(objsection).MZExeUnifiedLogicalSegment.MemBasePos + if assigned(objsection.ExeSection) and (objsection.ExeSection is TNewExeSection) then + Result:=HexStr(TNewExeSection(objsection.ExeSection).MemBasePos,4)+':'+HexStr(address,4) else - base:=(address shr 4) shl 4; - Result:=HexStr(base shr 4,4)+':'+HexStr(address-base,4); + begin + if assigned(TOmfObjSection(objsection).MZExeUnifiedLogicalSegment) then + base:=TOmfObjSection(objsection).MZExeUnifiedLogicalSegment.MemBasePos + else + base:=(address shr 4) shl 4; + Result:=HexStr(base shr 4,4)+':'+HexStr(address-base,4); + end; end; {****************************************************************************