+ write some debug info to the console in the wasm obj writer

This commit is contained in:
Nikolay Nikolov 2021-09-19 20:46:45 +03:00
parent 967b721e4f
commit 429454c8f4

View File

@ -230,9 +230,20 @@ implementation
****************************************************************************}
function TWasmObjOutput.writeData(Data:TObjData):boolean;
var
i: Integer;
objsec: TObjSection;
begin
Writer.write(WasmModuleMagic,SizeOf(WasmModuleMagic));
Writer.write(WasmVersion,SizeOf(WasmVersion));
Writeln('ObjSectionList:');
for i:=0 to Data.ObjSectionList.Count-1 do
begin
objsec:=TObjSection(Data.ObjSectionList[i]);
Writeln(objsec.Name, ' Size=', objsec.Size, ' MemPos=', objsec.MemPos, ' Data.Size=', objsec.Data.size, ' DataPos=', objsec.DataPos);
end;
result:=true;
end;