From 429454c8f48b197db4f8d25fb382cbc074f23e38 Mon Sep 17 00:00:00 2001 From: Nikolay Nikolov Date: Sun, 19 Sep 2021 20:46:45 +0300 Subject: [PATCH] + write some debug info to the console in the wasm obj writer --- compiler/ogwasm.pas | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/compiler/ogwasm.pas b/compiler/ogwasm.pas index ed080449d4..259ba99620 100644 --- a/compiler/ogwasm.pas +++ b/compiler/ogwasm.pas @@ -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;