mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 09:06:02 +02:00
+ implemented reading of the LNAMES omf record
git-svn-id: trunk@30968 -
This commit is contained in:
parent
e5a05f2c27
commit
28f7f16fc7
@ -121,7 +121,12 @@ interface
|
|||||||
|
|
||||||
TOmfObjInput = class(TObjInput)
|
TOmfObjInput = class(TObjInput)
|
||||||
private
|
private
|
||||||
|
FLNames: TOmfOrderedNameCollection;
|
||||||
FRawRecord: TOmfRawRecord;
|
FRawRecord: TOmfRawRecord;
|
||||||
|
|
||||||
|
function ReadLNames(RawRec: TOmfRawRecord): Boolean;
|
||||||
|
|
||||||
|
property LNames: TOmfOrderedNameCollection read FLNames;
|
||||||
public
|
public
|
||||||
constructor create;override;
|
constructor create;override;
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
@ -890,16 +895,30 @@ implementation
|
|||||||
TOmfObjInput
|
TOmfObjInput
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
|
function TOmfObjInput.ReadLNames(RawRec: TOmfRawRecord): Boolean;
|
||||||
|
var
|
||||||
|
LNamesRec: TOmfRecord_LNAMES;
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
LNamesRec:=TOmfRecord_LNAMES.Create;
|
||||||
|
LNamesRec.Names:=LNames;
|
||||||
|
LNamesRec.DecodeFrom(RawRec);
|
||||||
|
LNamesRec.Free;
|
||||||
|
Result:=True;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TOmfObjInput.create;
|
constructor TOmfObjInput.create;
|
||||||
begin
|
begin
|
||||||
inherited create;
|
inherited create;
|
||||||
cobjdata:=TOmfObjData;
|
cobjdata:=TOmfObjData;
|
||||||
|
FLNames:=TOmfOrderedNameCollection.Create;
|
||||||
FRawRecord:=TOmfRawRecord.Create;
|
FRawRecord:=TOmfRawRecord.Create;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TOmfObjInput.destroy;
|
destructor TOmfObjInput.destroy;
|
||||||
begin
|
begin
|
||||||
FRawRecord.Free;
|
FRawRecord.Free;
|
||||||
|
FLNames.Free;
|
||||||
inherited destroy;
|
inherited destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -923,6 +942,7 @@ implementation
|
|||||||
InputFileName:=AReader.FileName;
|
InputFileName:=AReader.FileName;
|
||||||
objdata:=CObjData.Create(InputFileName);
|
objdata:=CObjData.Create(InputFileName);
|
||||||
result:=false;
|
result:=false;
|
||||||
|
LNames.Clear;
|
||||||
FRawRecord.ReadFrom(FReader);
|
FRawRecord.ReadFrom(FReader);
|
||||||
if not FRawRecord.VerifyChecksumByte then
|
if not FRawRecord.VerifyChecksumByte then
|
||||||
begin
|
begin
|
||||||
@ -943,9 +963,8 @@ implementation
|
|||||||
end;
|
end;
|
||||||
case FRawRecord.RecordType of
|
case FRawRecord.RecordType of
|
||||||
RT_LNAMES:
|
RT_LNAMES:
|
||||||
begin
|
if not ReadLNames(FRawRecord) then
|
||||||
{todo}
|
exit;
|
||||||
end;
|
|
||||||
RT_SEGDEF,RT_SEGDEF32:
|
RT_SEGDEF,RT_SEGDEF32:
|
||||||
begin
|
begin
|
||||||
{todo}
|
{todo}
|
||||||
|
Loading…
Reference in New Issue
Block a user