]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
LVU: as installed after Nick's adjustments
authorAlexandre Oliva <aoliva@redhat.com>
Fri, 21 Jul 2017 09:09:06 +0000 (10:09 +0100)
committerAlexandre Oliva <aoliva@redhat.com>
Tue, 25 Jul 2017 20:56:46 +0000 (17:56 -0300)
34 files changed:
binutils/dwarf.c
gas/NEWS
gas/dwarf2dbg.c
gas/dwarf2dbg.h
gas/testsuite/gas/all/sleb128-9.d
gas/testsuite/gas/avr/large-debug-line-table.d
gas/testsuite/gas/elf/dwarf2-10.d
gas/testsuite/gas/elf/dwarf2-11.d
gas/testsuite/gas/elf/dwarf2-11.s
gas/testsuite/gas/elf/dwarf2-12.d
gas/testsuite/gas/elf/dwarf2-12.s
gas/testsuite/gas/elf/dwarf2-13.d
gas/testsuite/gas/elf/dwarf2-13.s
gas/testsuite/gas/elf/dwarf2-14.d
gas/testsuite/gas/elf/dwarf2-14.s
gas/testsuite/gas/elf/dwarf2-15.d
gas/testsuite/gas/elf/dwarf2-15.s
gas/testsuite/gas/elf/dwarf2-16.d
gas/testsuite/gas/elf/dwarf2-16.s
gas/testsuite/gas/elf/dwarf2-17.d
gas/testsuite/gas/elf/dwarf2-17.s
gas/testsuite/gas/elf/dwarf2-18.d
gas/testsuite/gas/elf/dwarf2-18.s
gas/testsuite/gas/elf/dwarf2-5.d
gas/testsuite/gas/elf/dwarf2-5.s
gas/testsuite/gas/elf/dwarf2-6.d
gas/testsuite/gas/elf/dwarf2-7.d
gas/testsuite/gas/elf/dwarf2-7.s
gas/testsuite/gas/elf/dwarf2-8.d
gas/testsuite/gas/elf/dwarf2-9.d
gas/testsuite/gas/elf/dwarf2-9.l
gas/testsuite/gas/lns/lns-common-1-alt.d
gas/testsuite/gas/lns/lns-duplicate.d
ld/testsuite/ld-avr/gc-section-debugline.d

index 4e96b325d094d6bc738576304ad3f4cfcf5ed25e..297f426ed567784efb9d17932f6bb4402383e587 100644 (file)
@@ -431,8 +431,8 @@ typedef struct State_Machine_Registers
   int basic_block;
   unsigned char op_index;
   unsigned char end_sequence;
-/* This variable hold the number of the last entry seen
-   in the File Table.  */
+  /* This variable hold the number of the last entry seen
+     in the File Table.  */
   unsigned int last_file_entry;
 } SMR;
 
@@ -3397,8 +3397,8 @@ display_debug_lines_raw (struct dwarf_section *section,
                        = ((state_machine_regs.op_index + uladv)
                            / linfo.li_max_ops_per_insn)
                        * linfo.li_min_insn_length;
-                     state_machine_regs.address
-                       += addrdelta;
+
+                     state_machine_regs.address += addrdelta;
                      state_machine_regs.op_index
                        = (state_machine_regs.op_index + uladv)
                        % linfo.li_max_ops_per_insn;
index ef44007c9897a77e15830e4c95f6fe81bd52aca1..843f6c1120e0df2aa25bd018ba1e0d4bb73a75ac 100644 (file)
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -1,5 +1,7 @@
 -*- text -*-
 
+* Add support for loaction views in DWARF debug line information.
+
 Changes in 2.29:
 
 * Add support for ELF SHF_GNU_MBIND.
index c3d6043ff0f714701e2d115028163f937c5720ca..4f703304d5294978127fe49292fc2159038f57b0 100644 (file)
 #define TC_PARSE_CONS_RETURN_NONE BFD_RELOC_NONE
 #endif
 
-struct line_entry {
+struct line_entry
+{
   struct line_entry *next;
   symbolS *label;
   struct dwarf2_line_info loc;
@@ -173,7 +174,8 @@ struct line_entry {
 static char unused[offsetof(struct line_entry, next) ? -1 : 1]
 ATTRIBUTE_UNUSED;
 
-struct line_subseg {
+struct line_subseg
+{
   struct line_subseg *next;
   subsegT subseg;
   struct line_entry *head;
@@ -181,7 +183,8 @@ struct line_subseg {
   struct line_entry **pmove_tail;
 };
 
-struct line_seg {
+struct line_seg
+{
   struct line_seg *next;
   segT seg;
   struct line_subseg *head;
@@ -193,7 +196,8 @@ struct line_seg {
 static struct line_seg *all_segs;
 static struct line_seg **last_seg_ptr;
 
-struct file_entry {
+struct file_entry
+{
   const char *filename;
   unsigned int dir;
 };
@@ -217,7 +221,8 @@ bfd_boolean dwarf2_loc_directive_seen;
 bfd_boolean dwarf2_loc_mark_labels;
 
 /* Current location as indicated by the most recent .loc directive.  */
-static struct dwarf2_line_info current = {
+static struct dwarf2_line_info current =
+{
   1, 1, 0, 0,
   DWARF2_LINE_DEFAULT_IS_STMT ? DWARF2_FLAG_IS_STMT : 0,
   0, NULL
@@ -302,6 +307,7 @@ static struct line_entry *
 reverse_line_entry_list (struct line_entry *h)
 {
   struct line_entry *p = NULL, *e, *n;
+
   for (e = h; e; e = n)
     {
       n = e->next;
@@ -314,14 +320,14 @@ reverse_line_entry_list (struct line_entry *h)
 /* Compute the view for E based on the previous entry P.  If we
    introduce an (undefined) view symbol for P, and H is given (P must
    be the tail in this case), introduce view symbols for earlier list
-   entries as well, until one of them is constant.
- */
+   entries as well, until one of them is constant.  */
 
 static void
 set_or_check_view (struct line_entry *e, struct line_entry *p,
                   struct line_entry *h)
 {
   expressionS viewx;
+
   memset (&viewx, 0, sizeof (viewx));
   viewx.X_unsigned = 1;
 
@@ -387,13 +393,14 @@ set_or_check_view (struct line_entry *e, struct line_entry *p,
 
   if (viewx.X_op != O_constant || viewx.X_add_number)
     {
+      expressionS incv;
+
       if (!p->loc.view)
        {
          p->loc.view = symbol_temp_make ();
          gas_assert (!S_IS_DEFINED (p->loc.view));
        }
 
-      expressionS incv;
       memset (&incv, 0, sizeof (incv));
       incv.X_unsigned = 1;
       incv.X_op = O_symbol;
@@ -425,18 +432,22 @@ set_or_check_view (struct line_entry *e, struct line_entry *p,
      compute E's.  */
   if (h && p && p->loc.view && !S_IS_DEFINED (p->loc.view))
     {
+      struct line_entry *h2;
       /* Reverse the list to avoid quadratic behavior going backwards
         in a single-linked list.  */
       struct line_entry *r = reverse_line_entry_list (h);
+
       gas_assert (r == p);
       /* Set or check views until we find a defined or absent view.  */
       do
        set_or_check_view (r, r->next, NULL);
       while (r->next && r->next->loc.view && !S_IS_DEFINED (r->next->loc.view)
             && (r = r->next));
+
       /* Unreverse the list, so that we can go forward again.  */
-      struct line_entry *h2 = reverse_line_entry_list (p);
+      h2 = reverse_line_entry_list (p);
       gas_assert (h2 == h);
+
       /* Starting from the last view we just defined, attempt to
         simplify the view expressions, until we do so to P.  */
       do
@@ -525,8 +536,10 @@ dwarf2_where (struct dwarf2_line_info *line)
 {
   if (debug_type == DEBUG_DWARF2)
     {
+      const char *filename;
+
       memset (line, 0, sizeof (*line));
-      const char *filename = as_where (&line->line);
+      filename = as_where (&line->line);
       line->filenum = get_filenum (filename, 0);
       line->column = 0;
       line->flags = DWARF2_FLAG_IS_STMT;
@@ -902,13 +915,16 @@ dwarf2_directive_loc (int dummy ATTRIBUTE_UNUSED)
        }
       else if (strcmp (p, "view") == 0)
        {
-         (void) restore_line_pointer (c);
          symbolS *sym;
+
+         (void) restore_line_pointer (c);
          SKIP_WHITESPACE ();
+
          if (ISDIGIT (*input_line_pointer)
              || *input_line_pointer == '-')
            {
              bfd_boolean force_reset = *input_line_pointer == '-';
+
              value = get_absolute_expression ();
              if (value != 0)
                {
@@ -928,6 +944,7 @@ dwarf2_directive_loc (int dummy ATTRIBUTE_UNUSED)
          else
            {
              char *name = read_symbol_name ();
+
              if (!name)
                return;
              sym = symbol_find_or_make (name);
@@ -1591,8 +1608,8 @@ process_entries (segT seg, struct line_entry *e)
 
       if (last_frag == NULL
          || (e->loc.view == force_reset_view && force_reset_view
-             /* If we're to reset the view, but we know we're
-                advancing PC, we don't have to force with
+             /* If we're going to reset the view, but we know we're
+                advancing the PC, we don't have to force with
                 set_address.  We know we do when we're at the same
                 address of the same frag, and we know we might when
                 we're in the beginning of a frag, and we were at the
@@ -2226,10 +2243,14 @@ dwarf2dbg_final_check (void)
      holding the check value in X_op_symbol.  */
   while (view_assert_failed)
     {
+      expressionS *expr;
+      symbolS *sym;
+      offsetT failed;
+
       gas_assert (!symbol_resolved_p (view_assert_failed));
 
-      expressionS *expr = symbol_get_value_expression (view_assert_failed);
-      symbolS *sym = view_assert_failed;
+      expr = symbol_get_value_expression (view_assert_failed);
+      sym = view_assert_failed;
 
       /* If view_assert_failed looks like a compound check in the
         chain, break it up.  */
@@ -2241,7 +2262,7 @@ dwarf2dbg_final_check (void)
       else
        view_assert_failed = NULL;
 
-      offsetT failed = resolve_symbol_value (sym);
+      failed = resolve_symbol_value (sym);
       if (!symbol_resolved_p (sym) || failed)
        {
          as_bad (_("view number mismatch"));
index 49826fd054a4e374e12368617f6b320385157c85..60a05685ab9f1753f83bb5ed98a95ebdab5324da 100644 (file)
@@ -28,7 +28,8 @@
 #define DWARF2_FLAG_PROLOGUE_END       (1 << 2)
 #define DWARF2_FLAG_EPILOGUE_BEGIN     (1 << 3)
 
-struct dwarf2_line_info {
+struct dwarf2_line_info
+{
   unsigned int filenum;
   unsigned int line;
   unsigned int column;
@@ -41,7 +42,7 @@ struct dwarf2_line_info {
 /* Implements the .file FILENO "FILENAME" directive.  FILENO can be 0
    to indicate that no file number has been assigned.  All real file
    number must be >0.  */
-extern char *dwarf2_directive_file (int dummy);
+extern char *dwarf2_directive_file (int);
 
 /* Implements the .loc FILENO LINENO [COLUMN] directive.  FILENO is
    the file number, LINENO the line number and the (optional) COLUMN
@@ -49,27 +50,27 @@ extern char *dwarf2_directive_file (int dummy);
    corresponds to.  FILENO can be 0 to indicate that the filename
    specified by the textually most recent .file directive should be
    used.  */
-extern void dwarf2_directive_loc (int dummy);
+extern void dwarf2_directive_loc (int);
 
 /* Implements the .loc_mark_labels {0,1} directive.  */
-extern void dwarf2_directive_loc_mark_labels (int dummy);
+extern void dwarf2_directive_loc_mark_labels (int);
 
 /* Returns the current source information.  If .file directives have
    been encountered, the info for the corresponding source file is
    returned.  Otherwise, the info for the assembly source file is
    returned.  */
-extern void dwarf2_where (struct dwarf2_line_info *l);
+extern void dwarf2_where (struct dwarf2_line_info *);
 
 /* A hook to allow the target backend to inform the line number state
    machine of isa changes when assembler debug info is enabled.  */
-extern void dwarf2_set_isa (unsigned int isa);
+extern void dwarf2_set_isa (unsigned int);
 
 /* This function generates .debug_line info based on the address and
    source information passed in the arguments.  ADDR should be the
    frag-relative offset of the instruction the information is for and
    L is the source information that should be associated with that
    address.  */
-extern void dwarf2_gen_line_info (addressT addr, struct dwarf2_line_info *l);
+extern void dwarf2_gen_line_info (addressT, struct dwarf2_line_info *);
 
 /* Must be called for each generated instruction.  */
 extern void dwarf2_emit_insn (int);
@@ -104,7 +105,8 @@ extern void dwarf2dbg_final_check (void);
 
 /* An enumeration which describes the sizes of offsets (to DWARF sections)
    and the mechanism by which the size is indicated.  */
-enum dwarf2_format {
+enum dwarf2_format
+{
   /* 32-bit format: the initial length field is 4 bytes long.  */
   dwarf2_format_32bit,
   /* DWARF3 64-bit format: the representation of the initial length
index 16f81ca935dfafd7ec3f12ef4fffda25f6f1bd97..5c5997f3786bd968a476c81fd67f51898552f2e1 100644 (file)
@@ -1,4 +1,5 @@
 #name: undefined symbols in sleb128 directive
 #source: sleb128-9.s
 #error-output: sleb128-9.l
-#target: *-*-*
+#not-target: riscv*-*
+
index 31ca7edd1431d543cfe8135b7f9d0503b8a51184..ecba3dfdd00f9003c657898de612e95f3b24c980 100644 (file)
@@ -9,7 +9,7 @@
 Decoded dump of debug contents of section \.debug_line:
 
 CU: large-debug-line-table\.c:
-File name                            Line number    Starting address
+File name                            Line number    Starting address.*
 large-debug-line-table\.c                       1                   0
 
 #...
index 4a4ef2c84190a4c97490dcedc078ea59da7cc1e9..13c3171e5a6490f1120db6184a17e01e37532f66 100644 (file)
@@ -1,3 +1,6 @@
 #as:
 #name: DWARF2 10
 #error-output: dwarf2-10.l
+# The mep target tries to relay code sections which breaks symbolic view computations.
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: mep-* tile*-*
index 04d447338c0d4c6e56f13b51fbef1580aacb119b..797d50d3682e67a099c34c024ae8b14ef2397cdb 100644 (file)
@@ -1,6 +1,10 @@
 #as:
 #readelf: -wL
 #name: DWARF2 11
+# The am3 avr cr16 crx mn10 msp430 nds32 pru rl78 and xtensa targets do not evaluate the subtraction of symbols at assembly time
+# The riscv targets do not support the subtraction of symbols.
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: am3-* avr-* cr16-* crx-* m32c-* mn10*-* msp430-* nds32*-* pru-* riscv*-* rl78-* tile*-* xtensa-*
 
 Decoded dump of debug contents of section \.debug_line:
 
index 187def587bea13bcccb53f36320734fb89b9da69..a1b0d0a8b94af7408809492a6235062439582cc7 100644 (file)
@@ -21,7 +21,7 @@
        .globl _start
 _start:
        .file 1 "dwarf2-11.c"
-       .int 0
+       .dc.l 0
        .loc 1 1 view 0
        .balign 8
        .loc 1 2 view 0
index a58e374b033cf0b923400c9d64b2dde833a0b328..0e1bc9b0cd155d6ac3bf25994094cde48a7fce9e 100644 (file)
@@ -1,6 +1,11 @@
 #as:
 #readelf: -x.rodata -wL
 #name: DWARF2 12
+# The am3 avr cr16 crx mn10 msp430 nds32 pru rl78 and xtensa targets do not evaluate the subtraction of symbols at assembly time
+# The riscv targets do not support the subtraction of symbols.
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: am3-* avr-* cr16-* crx-* mn10*-* msp430-* nds32*-* pru-* riscv*-* rl78-* tile*-* xtensa-*
+
 
 Hex dump of section '\.rodata':
   0x00000000 01 *.*
index 1a851d62f71f8b57337690ee74ea037dc37b2206..3e3392a61851b5c59dd00205d030db0d6c16d45e 100644 (file)
@@ -24,7 +24,7 @@ _start:
        .loc 1 1 view 0
        .loc 1 2 view -0
        .loc 1 3 view .L1
-       .int 0
+       .dc.l 0
        .size _start, .-_start
 
        .section .rodata
index d8b6aba42118a1eba5e91ee8be2362ece8453e6b..6961a6b6421c44b5c4789532cb6ef0973da15aee 100644 (file)
@@ -1,6 +1,10 @@
 #as:
 #readelf: -x.rodata -wL
 #name: DWARF2 13
+# The am3 avr cr16 crx mn10 msp430 nds32 pru rl78 and xtensa targets do not evaluate the subtraction of symbols at assembly time
+# The riscv targets do not support the subtraction of symbols.
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: am3-* avr-* cr16-* crx-* mn10*-* msp430-* nds32*-* pru-* riscv*-* rl78-* tile*-* xtensa-*
 
 Hex dump of section '\.rodata':
   0x00000000 01 *.*
index c13f9d4ba74e6c98f5d338959aa20a652e5a4296..118d692ce2b5d32babc96259528978ca082e0006 100644 (file)
        .globl _start
 _start:
        .file 1 "dwarf2-13.c"
-       .int 0
+       .dc.l 0
        .loc 1 1 view 0
        .balign 8
        .loc 1 2 view -0
        .loc 1 3 view .L1
-       .int 0
+       .dc.l 0
        .size _start, .-_start
 
        .section .rodata
index dfb3c3b250c6738d500f93fff229d7f83e59a07b..88af1452cebd961dd5894bc05ec60083ef868b13 100644 (file)
@@ -1,6 +1,10 @@
 #as:
 #readelf: -x.rodata -wL
 #name: DWARF2 14
+# The am3 avr cr16 crx mn10 msp430 nds32 pru rl78 and xtensa targets do not evaluate the subtraction of symbols at assembly time
+# The riscv targets do not support the subtraction of symbols.
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: am3-* avr-* cr16-* crx-* mn10*-* msp430-* nds32*-* pru-* riscv*-* rl78-* tile*-* xtensa-*
 
 Hex dump of section '\.rodata':
   0x00000000 01 *.*
index 4dde965631d0f3375bf1bd5867f8913ba9524e76..80f91ffc634d3a4bb1e9a2ecb6f570edff9f4dc7 100644 (file)
@@ -25,7 +25,7 @@ _start:
        .balign 4
        .loc 1 2 view -0
        .loc 1 3 view .L1
-       .int 0
+       .dc.l 0
        .size _start, .-_start
 
        .section .rodata
index eaf50c4425fa1924203034c20013fe741ea31b67..c7280e514ef15b1548fd416adfb0cdb158a70229 100644 (file)
@@ -1,6 +1,10 @@
 #as:
 #readelf: -x.rodata -wL
 #name: DWARF2 15
+# The am3 avr cr16 crx mn10 msp430 nds32 pru rl78 and xtensa targets do not evaluate the subtraction of symbols at assembly time
+# The riscv targets do not support the subtraction of symbols.
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: am3-* avr-* cr16-* crx-* mn10*-* msp430-* nds32*-* pru-* riscv*-* rl78-* tile*-* xtensa-*
 
 Hex dump of section '\.rodata':
   0x00000000 01 *.*
index 1fbd594c56728a942421bdb787000e7f2d78e1eb..e41f84aba41a1192ef20807aefe4b936ea990a07 100644 (file)
 _start:
        .file 1 "dwarf2-15.c"
        .loc 1 1 view 0
-       .int 0
+       .dc.l 0
        .loc 1 2 view -0
        .loc 1 3 view .L1
-       .int 0
+       .dc.l 0
        .size _start, .-_start
 
        .section .rodata
index 44301a70b7cb4149b99ce7476e84a89e4fa5f563..b01292ecdb207bed75276d4f046f77d4c104b008 100644 (file)
@@ -1,6 +1,11 @@
 #as:
 #readelf: -x.rodata -wL
 #name: DWARF2 16
+# The am3 avr cr16 crx mn10 msp430 nds32 pru rl78 and xtensa targets do not evaluate the subtraction of symbols at assembly time
+# The mep target tries to relay code sections which breaks symbolic view computations.
+# The riscv targets do not support the subtraction of symbols.
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: am3-* avr-* cr16-* crx-* mep-* mn10*-* msp430-* nds32*-* pru-* riscv*-* rl78-* tile*-* xtensa-*
 
 Hex dump of section '\.rodata':
   0x00000000 01 *.*
index 7976614db797f0a2825affbaf86500d25e04c5dc..deacf5638d0167a9dfe93224f6e7d8b83e0d5763 100644 (file)
 _start:
        .file 1 "dwarf2-16.c"
        .loc 1 1 view 0
-       .int 0
+       .dc.l 0
        .loc 1 2 view 0
        .balign 4
        .loc 1 3 view .L1
-       .int 0
+       .dc.l 0
        .size _start, .-_start
 
        .section .rodata
index 5e7ccdc2877c3f6adbca9fb152b610b6b071d39c..8c5c287a7d9ea29169563940c73da00af3aa90b8 100644 (file)
@@ -1,6 +1,11 @@
 #as:
 #readelf: -x.rodata -wL
 #name: DWARF2 17
+# The am3 avr cr16 crx mn10 msp430 nds32 pru rl78 and xtensa targets do not evaluate the subtraction of symbols at assembly time
+# The mep target tries to relay code sections which breaks symbolic view computations.
+# The riscv targets do not support the subtraction of symbols.
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: am3-* avr-* cr16-* crx-* mep-* mn10*-* msp430-* nds32*-* pru-* riscv*-* rl78-* tile*-* xtensa-*
 
 Hex dump of section '\.rodata':
   0x00000000 00 *.*
index 26c24cbf3ab37e3eb2cde77ae6854585dc9f388a..4e5d91bc10ca21c55a6a22d20728b5252550badf 100644 (file)
 _start:
        .file 1 "dwarf2-17.c"
        .loc 1 1 view 0
-       .int 0
+       .dc.l 0
        .loc 1 2 view 0
        .balign 8
        .loc 1 3 view .L1
-       .int 0
+       .dc.l 0
        .size _start, .-_start
 
        .section .rodata
index d695072bb62853438a7e9c84aedf5b33765e3e54..08f1af8026711e38df0f7d64770bc7af70a9b1cd 100644 (file)
@@ -1,6 +1,10 @@
 #as:
 #readelf: -x.rodata -wL
 #name: DWARF2 18
+# The am3 avr cr16 crx mn10 msp430 nds32 pru rl78 and xtensa targets do not evaluate the subtraction of symbols at assembly time
+# The riscv targets do not support the subtraction of symbols.
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: am3-* avr-* cr16-* crx-* mn10*-* msp430-* nds32*-* pru-* riscv*-* rl78-* tile*-* xtensa-*
 
 Hex dump of section '\.rodata':
   0x00000000 0100 *.*
index f32b3b308e9ba2894a83eeea17019455d85e1b92..9e5e210b800769a1254f988ade13ab2b0447f4fa 100644 (file)
@@ -23,9 +23,9 @@ _start:
        .file 1 "dwarf2-18.c"
        .loc 1 1
        .loc 1 2 view .L1
-       .int 0
+       .dc.l 0
        .loc 1 3 view .L2
-       .int 0
+       .dc.l 0
        .size _start, .-_start
 
        .section .rodata
index a4598ba3b5dd8a3fef5f9b8ce2e322e440b46fd8..6525c2ee14ef488773fe8c24a26e34a60f16638a 100644 (file)
@@ -1,11 +1,16 @@
 #as:
 #readelf: -x.rodata -wlL
 #name: DWARF2 5
+# The am3 avr cr16 crx mn10 msp430 nds32 pru rl78 rx and xtensa targets do not evaluate the subtraction of symbols at assembly time
+# The mep target tries to relay code sections which breaks symbolic view computations.
+# The riscv targets do not support the subtraction of symbols.
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: am3-* avr-* cr16-* crx-* mep-* mn10*-* msp430-* nds32*-* pru-* riscv*-* rl78-* rx-* tile*-* xtensa-*
 
 Hex dump of section '\.rodata':
   0x00000000 01010201 010203 *.*
 
-Raw dump of debug contents of section .debug_line:
+Raw dump of debug contents of section \.debug_line:
 
   Offset:                      0x0
   Length:                      [0-9]*
index 91b9f955565ecf48e17ed92be27c4a6e27bf0f29..3e58239f0ab170ce55f2f2d45836016daeb6ae18 100644 (file)
@@ -23,7 +23,7 @@ _start:
        .file 1 "dwarf2-5.c"
        .loc 1 1 view 0
        .loc 1 2 view .L2
-       .int 0
+       .dc.l 0
        .loc 1 3 view 0
        .balign 4
        .loc 1 4 view .L4
@@ -31,21 +31,21 @@ _start:
        .org .+1
        .balign 4
        .loc 1 6 view 0
-       .int 0
+       .dc.l 0
        .text
        .globl func
        .type func, %function
 func:
        .loc 1 7 view 0
        .loc 1 8 view .L8
-       .int 0
+       .dc.l 0
        .loc 1 9 view 0
        .loc 1 10 view .L10
        .pushsection .text
        .loc 1 11 view .L11
        .popsection
        .loc 1 12 view .L12
-       .int 0
+       .dc.l 0
        .size func, .-func
 
        .section .rodata
index 39557e162a55ed083fb51d3bdaa10c7ead025137..93489d6ba9d33e01c718510fca2b2b9c3d767f5f 100644 (file)
@@ -1,6 +1,8 @@
 #as:
 #readelf: -wlL
 #name: DWARF2 6
+# These targets either do not support or do not evaluate the subtraction of symbols at assembly time
+#not-target: am3-* avr-* cr16-* crx-* mn10*-* msp430-* nds32*-* pru-* riscv*-* rl78-* xtensa-*
 
 Raw dump of debug contents of section .debug_line:
 
index d78d91ed69a6d2dd2caa97afe1de0c031a8b432a..8782d6bc4424205cd6e73d3a50774739067fefec 100644 (file)
@@ -1,6 +1,10 @@
 #as:
 #readelf: -x.rodata -wL
 #name: DWARF2 7
+# The am3 avr cr16 crx mn10 msp430 nds32 pru rl78 and xtensa targets do not evaluate the subtraction of symbols at assembly time
+# The riscv targets do not support the subtraction of symbols.
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: am3-* avr-* cr16-* crx-* mn10*-* msp430-* nds32*-* pru-* riscv*-* rl78-* tile*-* xtensa-*
 
 Hex dump of section '\.rodata':
   0x00000000 01 *.*
@@ -12,4 +16,4 @@ File name  *Line number  *Starting address  *View
 dwarf2-7\.c  *1  *0
 dwarf2-7\.c  *2  *0
 dwarf2-7\.c  *3  *0  *1
-dwarf2-7\.c  *3  *0x4
+dwarf2-7\.c  *3  *0x.
index d8fd0075333d1f31dcb5fb3288b80e30a3d2bf87..e96e64e7fb99378cfecc1867a80925c87292b5ed 100644 (file)
@@ -32,5 +32,5 @@ _start:
 func:
        .loc 1 2 view -0
        .loc 1 3 view .L1
-       .int 0
+       .dc.l 0
        .size func, .-func
index a28d613a9541c5b87af0ece15734d84920e68eb1..455079d95121a0eef9954aab9ab6c8372506e805 100644 (file)
@@ -1,3 +1,5 @@
 #as:
 #name: DWARF2 8
 #error-output: dwarf2-8.l
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: tile*-*
index 7e4085857f0a56f41d29968072499a0d88766b9e..ebf11cbb3291c74f2696fb81a5c2debffe9e1be8 100644 (file)
@@ -1,3 +1,5 @@
 #as:
 #name: DWARF2 9
 #error-output: dwarf2-9.l
+# The tile targets require 8-byte instructions, but the test only simulates 4-byte instructions.
+#not-target: tile*-*
index 7f107fa51483be9d988cbf890a2f1d425f5b1bd2..fb447740f28fe90430cbc3efb7e8f00d5af393fe 100644 (file)
@@ -1,2 +1,2 @@
 [^:]*: Assembler messages:
-[^:]*:30: Error: view number mismatch
+[^:]*.* Error: view number mismatch
index e762b8316647de9da3d8d1061c8a5e7f80d0a105..8aa8c7356c3fedc9ce6cb1c47921fc7753f5ef07 100644 (file)
@@ -7,37 +7,37 @@ Raw dump of debug contents of section \.debug_line:
 #...
  Line Number Statements:
   \[0x.*\]  Extended opcode 2: set Address to .*
-  \[0x.*\]  Copy
+  \[0x.*\]  Copy( \(view 1\)|)
   \[0x.*\]  Set column to 3
   \[0x.*\]  Advance Line by 1 to 2
   \[0x.*\]  Advance PC by fixed size amount .* to .*
-  \[0x.*\]  Copy
+  \[0x.*\]  Copy( \(view 1\)|)
   \[0x.*\]  Set prologue_end to true
   \[0x.*\]  Advance Line by 1 to 3
   \[0x.*\]  Advance PC by fixed size amount .* to .*
-  \[0x.*\]  Copy
+  \[0x.*\]  Copy( \(view 2\)|)
   \[0x.*\]  Set column to 0
   \[0x.*\]  Set epilogue_begin to true
   \[0x.*\]  Advance Line by 1 to 4
   \[0x.*\]  Advance PC by fixed size amount .* to .*
-  \[0x.*\]  Copy
+  \[0x.*\]  Copy( \(view 3\)|)
   \[0x.*\]  Set ISA to 1
   \[0x.*\]  Set basic block
   \[0x.*\]  Advance Line by 1 to 5
   \[0x.*\]  Advance PC by fixed size amount .* to .*
-  \[0x.*\]  Copy
+  \[0x.*\]  Copy( \(view 4\)|)
   \[0x.*\]  Set is_stmt to 0
   \[0x.*\]  Advance Line by 1 to 6
   \[0x.*\]  Advance PC by fixed size amount .* to .*
-  \[0x.*\]  Copy
+  \[0x.*\]  Copy( \(view 5\)|)
   \[0x.*\]  Set is_stmt to 1
   \[0x.*\]  Advance Line by 1 to 7
   \[0x.*\]  Advance PC by fixed size amount .* to .*
-  \[0x.*\]  Copy
+  \[0x.*\]  Copy( \(view 6\)|)
   \[0x.*\]  Extended opcode 4: set Discriminator to 1
   \[0x.*\]  Advance Line by 0 to 7
   \[0x.*\]  Advance PC by fixed size amount .* to .*
-  \[0x.*\]  Copy
+  \[0x.*\]  Copy( \(view 7\)|)
   \[0x.*\]  Advance PC by fixed size amount .* to .*
   \[0x.*\]  Extended opcode 1: End of Sequence
 #...
index 4bf44e07e34a08d1e6e1e85d61359049df9eb6b3..6aed5e75b9d725922811c445b872eda0953a3e45 100644 (file)
@@ -6,5 +6,5 @@ Raw dump of debug contents of section \.z?debug_line:
   \[0x.*\]  Extended opcode 2: set Address to .*
   \[0x.*\]  Copy
   \[0x.*\]  Set basic block
-  \[0x.*\]  .* by 1 to 2 \(view 1\)
+  \[0x.*\]  .* by 1 to 2( \(view 1\)|)
 #pass
index f8c07de6a4aa39e940055176f97b2865c1de12a8..4c155a90d18c9781802ebf5c3574f9646822515b 100644 (file)
 Decoded dump of debug contents of section .debug_line:
 
 .*:
-File name                            Line number    Starting address
+File name                            Line number    Starting address    View
 per-function-debugline.s                      39                   0
 
-per-function-debugline.s                      40                 0x2
+per-function-debugline.s                      40                 0x2       1
 
-per-function-debugline.s                      41                 0x4
+per-function-debugline.s                      41                 0x4       2
 
-per-function-debugline.s                      42                 0x6
+per-function-debugline.s                      42                 0x6       3
 
-per-function-debugline.s                      47                 0x8
+per-function-debugline.s                      47                 0x8       4
 
-per-function-debugline.s                      48                 0xc
+per-function-debugline.s                      48                 0xc       5
 
-per-function-debugline.s                      49                0x10
+per-function-debugline.s                      49                0x10       6
 
-per-function-debugline.s                      50                0x12
+per-function-debugline.s                      50                0x12       7
 
-per-function-debugline.s                      51                0x16
+per-function-debugline.s                      51                0x16       8
 
-per-function-debugline.s                      52                0x1a
+per-function-debugline.s                      52                0x1a       9
 
-per-function-debugline.s                      54                0x1c
+per-function-debugline.s                      54                0x1c      10
 
-per-function-debugline.s                      55                0x1e
+per-function-debugline.s                      55                0x1e      11
 
-per-function-debugline.s                      56                0x20
+per-function-debugline.s                      56                0x20      12
 
-per-function-debugline.s                      62                0x22
-
-per-function-debugline.s                      63                0x24
+per-function-debugline.s                      56                0x22      13
 
-per-function-debugline.s                      64                0x26
-
-per-function-debugline.s                      65                0x28
+per-function-debugline.s                      62                0x22
 
-per-function-debugline.s                      70                0x2a
+per-function-debugline.s                      63                0x24       1
 
-per-function-debugline.s                      71                0x2e
+per-function-debugline.s                      64                0x26       2
 
-per-function-debugline.s                      72                0x32
+per-function-debugline.s                      65                0x28       3
 
-per-function-debugline.s                      73                0x36
+per-function-debugline.s                      70                0x2a       4
 
-per-function-debugline.s                      74                0x38
+per-function-debugline.s                      71                0x2e       5
 
-per-function-debugline.s                      75                0x3c
+per-function-debugline.s                      72                0x32       6
 
-per-function-debugline.s                      76                0x40
+per-function-debugline.s                      73                0x36       7
 
-per-function-debugline.s                      77                0x44
+per-function-debugline.s                      74                0x38       8
 
-per-function-debugline.s                      79                0x48
+per-function-debugline.s                      75                0x3c       9
 
-per-function-debugline.s                      80                0x4a
+per-function-debugline.s                      76                0x40      10
 
-per-function-debugline.s                      81                0x4c
+per-function-debugline.s                      77                0x44      11
 
+per-function-debugline.s                      79                0x48      12
 
+per-function-debugline.s                      80                0x4a      13
+#pass