Browse Source

+ log the properties of ait_symbol for debugging purposes in the LLVM-MC asm writer

git-svn-id: branches/wasm@46523 -
nickysn 5 years ago
parent
commit
c3b971e0dd
1 changed files with 13 additions and 0 deletions
  1. 13 0
      compiler/wasm32/agllvmmc.pas

+ 13 - 0
compiler/wasm32/agllvmmc.pas

@@ -147,6 +147,19 @@ implementation
               end;
             ait_symbol :
               begin
+                writer.AsmWrite(asminfo^.comment);
+                writer.AsmWrite('ait_symbol ');
+                writer.AsmWrite(tai_symbol(hp).sym.name);
+                writer.AsmWrite(' is_global='+tostr(Ord(tai_symbol(hp).is_global))+' has_value='+tostr(Ord(tai_symbol(hp).has_value)));
+                writer.AsmWrite(' size='+tostr(tai_symbol(hp).size));
+                writer.AsmWrite(' value='+tostr(tai_symbol(hp).value));
+                writer.AsmWrite(' sym.typ=');
+                Str(tai_symbol(hp).sym.typ,s);
+                writer.AsmWrite(s);
+                writer.AsmWrite(' sym.bind=');
+                Str(tai_symbol(hp).sym.bind,s);
+                writer.AsmWrite(s);
+                writer.AsmLn;
                 if not(tai_symbol(hp).has_value) then
                   begin
                     //if tai_symbol(hp).is_global then