* 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 -
This commit is contained in:
nickysn 2018-05-20 22:50:46 +00:00
parent 1a2f364e68
commit d1cdd8be7c
2 changed files with 6 additions and 1 deletions

View File

@ -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);

View File

@ -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;
{---------------------------------------------------------------------------