Jelajahi Sumber

* do not emit padding bytes after the dwarf arange header on i8086 for
compatibility with Open Watcom (also, the dwarf spec is not very clear about
the alignment requirements on segmented architectures, so that's why we do
this by default, instead of putting it behind a -go debug switch)

git-svn-id: trunk@39075 -

nickysn 7 tahun lalu
induk
melakukan
d1cdd8be7c
2 mengubah file dengan 6 tambahan dan 1 penghapusan
  1. 2 1
      compiler/dbgdwarf.pas
  2. 4 0
      rtl/inc/lnfodwrf.pp

+ 2 - 1
compiler/dbgdwarf.pas

@@ -3248,14 +3248,15 @@ implementation
             current_asmdata.asmlists[al_dwarf_aranges].concat(tai_const.create_8bit(4));
             { segment_size }
             current_asmdata.asmlists[al_dwarf_aranges].concat(tai_const.create_8bit(2));
+            { no alignment/padding bytes on i8086 for Open Watcom compatibility }
 {$else i8086}
             { address_size }
             current_asmdata.asmlists[al_dwarf_aranges].concat(tai_const.create_8bit(sizeof(pint)));
             { segment_size }
             current_asmdata.asmlists[al_dwarf_aranges].concat(tai_const.create_8bit(0));
-{$endif i8086}
             { alignment }
             current_asmdata.asmlists[al_dwarf_aranges].concat(tai_const.create_32bit_unaligned(0));
+{$endif i8086}
 
             { start ranges section }
             new_section(current_asmdata.asmlists[al_dwarf_ranges],sec_debug_ranges,'',0);

+ 4 - 0
rtl/inc/lnfodwrf.pp

@@ -210,7 +210,9 @@ type
     debug_info_offset : QWord;
     address_size : Byte;
     segment_size : Byte;
+{$ifndef CPUI8086}
     padding : DWord;
+{$endif CPUI8086}
   end;
 
   TDebugArangesHeader32= packed record
@@ -219,7 +221,9 @@ type
     debug_info_offset : DWord;
     address_size : Byte;
     segment_size : Byte;
+{$ifndef CPUI8086}
     padding : DWord;
+{$endif CPUI8086}
   end;
 
 {---------------------------------------------------------------------------