소스 검색

* 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 년 전
부모
커밋
d1cdd8be7c
2개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  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;
 
 {---------------------------------------------------------------------------