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 ++++++ .../testsuite/binutils-all/i386/compressed-1a.d | 2 +- .../testsuite/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 612b0ed..b61ea26 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 b6c6ecc..70b13ce 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 23151ef..3c8eb54 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 f497b57..5a1eeea 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 57c837b..faaaa6e 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 c53fcb5..594c9a6 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 c785137..e04f546 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 a7daa4b..f78ad06 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 3666399..04f7ded 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 37aec45..c6de0d6 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 7b4aead..a78e1e2 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 1b77b22..ea771c4 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 2e68d9f..b8b4434 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 12008bb..ac51238 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 ecce154..e447cb6 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 8eb2c1c..27bc810 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 ef44136..80c7be4 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 7f19ad5..c63a854 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 972cf56..6ebb510 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 8fd71e5..39fd33d 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 0327e98..14cd766 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 03d08a2..62e342b 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.7.4