From 8acbe8ffa02f62eb9371b8626576f83fcd6989af Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 3 Dec 2018 17:26:41 +0000 Subject: [PATCH] Update the assembler to use a version of 3 when generating the header of the .debug_line section. PR 23941 gas * dwarf2dbg.c (DWARF2_LINE_VERSION): Change to 3. * testsuite/gas/elf/dwarf2-3.d: Update expected output. * testsuite/gas/elf/dwarf2-5.d: Likewise. * testsuite/gas/i386/debug1.d: Likewise. * testsuite/gas/i386/dw2-compress-1.d: Likewise. * testsuite/gas/i386/dw2-compress-3a.d: Likewise. * testsuite/gas/i386/dw2-compress-3b.d: Likewise. * testsuite/gas/i386/dw2-compressed-1.d: Likewise. * testsuite/gas/i386/dw2-compressed-3a.d: Likewise. * testsuite/gas/i386/dw2-compressed-3b.d: Likewise. * testsuite/gas/ia64/pr13167.d: Likewise. * testsuite/gas/mips/loc-swap-2.d: Likewise. * testsuite/gas/mips/loc-swap.d: Likewise. * testsuite/gas/mips/micromips@loc-swap-2.d: Likewise. * testsuite/gas/mips/micromips@loc-swap.d: Likewise. * testsuite/gas/mips/mips16@loc-swap-2.d: Likewise. * testsuite/gas/mips/mips16@loc-swap.d: Likewise. * testsuite/gas/mips/mips16e@loc-swap.d: Likewise. binutils* testsuite/binutils-all/i386/compressed-1a.d: Update expected output. * testsuite/binutils-all/x86-64/compressed-1a.d: Likewise. --- binutils/ChangeLog | 6 +++++ .../binutils-all/i386/compressed-1a.d | 2 +- .../binutils-all/x86-64/compressed-1a.d | 2 +- gas/ChangeLog | 22 +++++++++++++++++++ gas/dwarf2dbg.c | 4 ++-- gas/testsuite/gas/elf/dwarf2-3.d | 2 +- gas/testsuite/gas/elf/dwarf2-5.d | 2 +- gas/testsuite/gas/i386/debug1.d | 2 +- gas/testsuite/gas/i386/dw2-compress-1.d | 2 +- gas/testsuite/gas/i386/dw2-compress-3a.d | 2 +- gas/testsuite/gas/i386/dw2-compress-3b.d | 2 +- gas/testsuite/gas/i386/dw2-compressed-1.d | 2 +- gas/testsuite/gas/i386/dw2-compressed-3a.d | 2 +- gas/testsuite/gas/i386/dw2-compressed-3b.d | 2 +- gas/testsuite/gas/ia64/pr13167.d | 2 +- gas/testsuite/gas/mips/loc-swap-2.d | 2 +- gas/testsuite/gas/mips/loc-swap.d | 2 +- gas/testsuite/gas/mips/micromips@loc-swap-2.d | 2 +- gas/testsuite/gas/mips/micromips@loc-swap.d | 2 +- gas/testsuite/gas/mips/mips16@loc-swap-2.d | 2 +- gas/testsuite/gas/mips/mips16@loc-swap.d | 2 +- gas/testsuite/gas/mips/mips16e@loc-swap.d | 2 +- 22 files changed, 49 insertions(+), 21 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 612b0ed0a32..b61ea2656c3 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2018-12-03 Nick Clifton + + PR 23941 + * testsuite/binutils-all/i386/compressed-1a.d: Update expected output. + * testsuite/binutils-all/x86-64/compressed-1a.d: Likewise. + 2018-12-01 Alan Modra PR 23946 diff --git a/binutils/testsuite/binutils-all/i386/compressed-1a.d b/binutils/testsuite/binutils-all/i386/compressed-1a.d index b6c6ecc0f54..70b13cee5d6 100644 --- a/binutils/testsuite/binutils-all/i386/compressed-1a.d +++ b/binutils/testsuite/binutils-all/i386/compressed-1a.d @@ -64,7 +64,7 @@ Raw dump of debug contents of section .[z]?debug_line: Offset: 0x0 Length: 64 - DWARF Version: 2 + DWARF Version: . Prologue Length: 37 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/binutils/testsuite/binutils-all/x86-64/compressed-1a.d b/binutils/testsuite/binutils-all/x86-64/compressed-1a.d index 23151efe0bd..3c8eb545024 100644 --- a/binutils/testsuite/binutils-all/x86-64/compressed-1a.d +++ b/binutils/testsuite/binutils-all/x86-64/compressed-1a.d @@ -64,7 +64,7 @@ Raw dump of debug contents of section .[z]?debug_line: Offset: 0x0 Length: 67 - DWARF Version: 2 + DWARF Version: . Prologue Length: 37 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/ChangeLog b/gas/ChangeLog index f497b578f46..5a1eeea28e9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,25 @@ +2018-12-03 Nick Clifton + + PR 23941 + * dwarf2dbg.c (DWARF2_LINE_VERSION): Change to 3. + * testsuite/gas/elf/dwarf2-3.d: Update expected output. + * testsuite/gas/elf/dwarf2-5.d: Likewise. + * testsuite/gas/i386/debug1.d: Likewise. + * testsuite/gas/i386/dw2-compress-1.d: Likewise. + * testsuite/gas/i386/dw2-compress-3a.d: Likewise. + * testsuite/gas/i386/dw2-compress-3b.d: Likewise. + * testsuite/gas/i386/dw2-compressed-1.d: Likewise. + * testsuite/gas/i386/dw2-compressed-3a.d: Likewise. + * testsuite/gas/i386/dw2-compressed-3b.d: Likewise. + * testsuite/gas/ia64/pr13167.d: Likewise. + * testsuite/gas/mips/loc-swap-2.d: Likewise. + * testsuite/gas/mips/loc-swap.d: Likewise. + * testsuite/gas/mips/micromips@loc-swap-2.d: Likewise. + * testsuite/gas/mips/micromips@loc-swap.d: Likewise. + * testsuite/gas/mips/mips16@loc-swap-2.d: Likewise. + * testsuite/gas/mips/mips16@loc-swap.d: Likewise. + * testsuite/gas/mips/mips16e@loc-swap.d: Likewise. + 2018-12-01 Alan Modra PR 23938 diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c index 57c837b67a4..faaaa6ee452 100644 --- a/gas/dwarf2dbg.c +++ b/gas/dwarf2dbg.c @@ -97,9 +97,9 @@ #define DWARF2_ARANGES_VERSION 2 #endif -/* This implementation output version 2 .debug_line information. */ +/* This implementation outputs version 3 .debug_line information. */ #ifndef DWARF2_LINE_VERSION -#define DWARF2_LINE_VERSION 2 +#define DWARF2_LINE_VERSION 3 #endif #include "subsegs.h" diff --git a/gas/testsuite/gas/elf/dwarf2-3.d b/gas/testsuite/gas/elf/dwarf2-3.d index c53fcb5408b..594c9a6d973 100644 --- a/gas/testsuite/gas/elf/dwarf2-3.d +++ b/gas/testsuite/gas/elf/dwarf2-3.d @@ -6,7 +6,7 @@ Raw dump of debug contents of section \.z?debug_line: Offset: 0x0 Length: 41 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 35 Minimum Instruction Length: [0-9]* Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/elf/dwarf2-5.d b/gas/testsuite/gas/elf/dwarf2-5.d index c7851371e02..e04f54652ce 100644 --- a/gas/testsuite/gas/elf/dwarf2-5.d +++ b/gas/testsuite/gas/elf/dwarf2-5.d @@ -14,7 +14,7 @@ Raw dump of debug contents of section \.debug_line: Offset: 0x0 Length: [0-9]* - DWARF Version: 2 + DWARF Version: 3 Prologue Length: [0-9]* Minimum Instruction Length: [0-9]* Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/i386/debug1.d b/gas/testsuite/gas/i386/debug1.d index a7daa4b1b6b..f78ad06bf66 100644 --- a/gas/testsuite/gas/i386/debug1.d +++ b/gas/testsuite/gas/i386/debug1.d @@ -6,7 +6,7 @@ Raw dump of debug contents of section \.z?debug_line: Offset: 0x0 Length: .* - DWARF Version: 2 + DWARF Version: 3 Prologue Length: .* Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/i386/dw2-compress-1.d b/gas/testsuite/gas/i386/dw2-compress-1.d index 36663995a1f..04f7dedf1ef 100644 --- a/gas/testsuite/gas/i386/dw2-compress-1.d +++ b/gas/testsuite/gas/i386/dw2-compress-1.d @@ -62,7 +62,7 @@ Raw dump of debug contents of section .z?debug_line: Offset: 0x0 Length: 62 - DWARF Version: 2 + DWARF Version: . Prologue Length: 35 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/i386/dw2-compress-3a.d b/gas/testsuite/gas/i386/dw2-compress-3a.d index 37aec45ae4b..c6de0d6f57c 100644 --- a/gas/testsuite/gas/i386/dw2-compress-3a.d +++ b/gas/testsuite/gas/i386/dw2-compress-3a.d @@ -68,7 +68,7 @@ Raw dump of debug contents of section .debug_line: Offset: 0x0 Length: 45 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 39 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/i386/dw2-compress-3b.d b/gas/testsuite/gas/i386/dw2-compress-3b.d index 7b4aead38a2..a78e1e25e9f 100644 --- a/gas/testsuite/gas/i386/dw2-compress-3b.d +++ b/gas/testsuite/gas/i386/dw2-compress-3b.d @@ -68,7 +68,7 @@ Raw dump of debug contents of section .debug_line: Offset: 0x0 Length: 45 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 39 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/i386/dw2-compressed-1.d b/gas/testsuite/gas/i386/dw2-compressed-1.d index 1b77b22f574..ea771c40882 100644 --- a/gas/testsuite/gas/i386/dw2-compressed-1.d +++ b/gas/testsuite/gas/i386/dw2-compressed-1.d @@ -63,7 +63,7 @@ Raw dump of debug contents of section .debug_line: Offset: 0x0 Length: 62 - DWARF Version: 2 + DWARF Version: . Prologue Length: 35 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/i386/dw2-compressed-3a.d b/gas/testsuite/gas/i386/dw2-compressed-3a.d index 2e68d9f188a..b8b4434a51e 100644 --- a/gas/testsuite/gas/i386/dw2-compressed-3a.d +++ b/gas/testsuite/gas/i386/dw2-compressed-3a.d @@ -68,7 +68,7 @@ Raw dump of debug contents of section .debug_line: Offset: 0x0 Length: 45 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 39 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/i386/dw2-compressed-3b.d b/gas/testsuite/gas/i386/dw2-compressed-3b.d index 12008bb7fba..ac51238a96d 100644 --- a/gas/testsuite/gas/i386/dw2-compressed-3b.d +++ b/gas/testsuite/gas/i386/dw2-compressed-3b.d @@ -68,7 +68,7 @@ Raw dump of debug contents of section .debug_line: Offset: 0x0 Length: 45 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 39 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/ia64/pr13167.d b/gas/testsuite/gas/ia64/pr13167.d index ecce154df42..e447cb64cc6 100644 --- a/gas/testsuite/gas/ia64/pr13167.d +++ b/gas/testsuite/gas/ia64/pr13167.d @@ -4,7 +4,7 @@ Raw dump of debug contents of section \.debug_line: Offset: 0x0 Length: 51 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 26 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/mips/loc-swap-2.d b/gas/testsuite/gas/mips/loc-swap-2.d index 8eb2c1c76e7..27bc810baf8 100644 --- a/gas/testsuite/gas/mips/loc-swap-2.d +++ b/gas/testsuite/gas/mips/loc-swap-2.d @@ -8,7 +8,7 @@ Raw dump of debug contents of section .debug_line: Offset: 0x0 Length: 60 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 35 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/mips/loc-swap.d b/gas/testsuite/gas/mips/loc-swap.d index ef44136c448..80c7be4994b 100644 --- a/gas/testsuite/gas/mips/loc-swap.d +++ b/gas/testsuite/gas/mips/loc-swap.d @@ -11,7 +11,7 @@ Raw dump of debug contents of section \.debug_line: Offset: 0x0 Length: 67 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 33 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/mips/micromips@loc-swap-2.d b/gas/testsuite/gas/mips/micromips@loc-swap-2.d index 7f19ad58b9b..c63a854fded 100644 --- a/gas/testsuite/gas/mips/micromips@loc-swap-2.d +++ b/gas/testsuite/gas/mips/micromips@loc-swap-2.d @@ -8,7 +8,7 @@ Raw dump of debug contents of section .debug_line: Offset: 0x0 Length: 60 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 35 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/mips/micromips@loc-swap.d b/gas/testsuite/gas/mips/micromips@loc-swap.d index 972cf5667b3..6ebb510d274 100644 --- a/gas/testsuite/gas/mips/micromips@loc-swap.d +++ b/gas/testsuite/gas/mips/micromips@loc-swap.d @@ -12,7 +12,7 @@ Raw dump of debug contents of section \.debug_line: Offset: 0x0 Length: 67 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 33 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/mips/mips16@loc-swap-2.d b/gas/testsuite/gas/mips/mips16@loc-swap-2.d index 8fd71e5ae7c..39fd33da9e2 100644 --- a/gas/testsuite/gas/mips/mips16@loc-swap-2.d +++ b/gas/testsuite/gas/mips/mips16@loc-swap-2.d @@ -8,7 +8,7 @@ Raw dump of debug contents of section .debug_line: Offset: 0x0 Length: 60 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 35 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/mips/mips16@loc-swap.d b/gas/testsuite/gas/mips/mips16@loc-swap.d index 0327e98410b..14cd7669580 100644 --- a/gas/testsuite/gas/mips/mips16@loc-swap.d +++ b/gas/testsuite/gas/mips/mips16@loc-swap.d @@ -11,7 +11,7 @@ Raw dump of debug contents of section \.debug_line: Offset: 0x0 Length: 67 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 33 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 diff --git a/gas/testsuite/gas/mips/mips16e@loc-swap.d b/gas/testsuite/gas/mips/mips16e@loc-swap.d index 03d08a2dd65..62e342b14d1 100644 --- a/gas/testsuite/gas/mips/mips16e@loc-swap.d +++ b/gas/testsuite/gas/mips/mips16e@loc-swap.d @@ -11,7 +11,7 @@ Raw dump of debug contents of section \.debug_line: Offset: 0x0 Length: 67 - DWARF Version: 2 + DWARF Version: 3 Prologue Length: 33 Minimum Instruction Length: 1 Initial value of 'is_stmt': 1 -- 2.30.2