]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
LVU: add plenty of tests
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 18 May 2017 23:32:49 +0000 (20:32 -0300)
committerAlexandre Oliva <aoliva@redhat.com>
Thu, 18 May 2017 23:32:49 +0000 (20:32 -0300)
28 files changed:
gas/testsuite/gas/elf/dwarf2-10.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-10.l [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-10.s [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-11.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-11.s [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-12.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-12.s [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-13.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-13.s [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-14.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-14.s [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-15.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-15.s [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-16.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-16.s [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-17.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-17.s [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-18.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-18.s [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-7.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-7.s [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-8.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-8.l [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-8.s [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-9.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-9.l [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-9.s [new file with mode: 0644]
gas/testsuite/gas/elf/elf.exp

diff --git a/gas/testsuite/gas/elf/dwarf2-10.d b/gas/testsuite/gas/elf/dwarf2-10.d
new file mode 100644 (file)
index 0000000..4a4ef2c
--- /dev/null
@@ -0,0 +1,3 @@
+#as:
+#name: DWARF2 10
+#error-output: dwarf2-10.l
diff --git a/gas/testsuite/gas/elf/dwarf2-10.l b/gas/testsuite/gas/elf/dwarf2-10.l
new file mode 100644 (file)
index 0000000..b5f1f65
--- /dev/null
@@ -0,0 +1,2 @@
+[^:]*: Assembler messages:
+[^:]*: Error: view number mismatch
diff --git a/gas/testsuite/gas/elf/dwarf2-10.s b/gas/testsuite/gas/elf/dwarf2-10.s
new file mode 100644 (file)
index 0000000..c4052f1
--- /dev/null
@@ -0,0 +1,32 @@
+/* Test view numbering zero-assert checking with zero-sized align.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+       .file "dwarf2-10.c"
+       .text
+       .align 4
+       .globl _start
+_start:
+       .file 1 "dwarf2-10.c"
+       .loc 1 1 view 0
+       .align 4        /* No skip needed here...  */
+       .loc 1 2 view 0 /* so this zero-view check fails.  */
+       .int 0
+       .loc 1 3 view 0
+       .align 8        /* Skip 4 more bytes after .int...  */
+       .loc 1 4 view 0 /* so this is a zero view indeed.  */
+       .int 0
+       .size _start, .-_start
diff --git a/gas/testsuite/gas/elf/dwarf2-11.d b/gas/testsuite/gas/elf/dwarf2-11.d
new file mode 100644 (file)
index 0000000..04d4473
--- /dev/null
@@ -0,0 +1,11 @@
+#as:
+#readelf: -wL
+#name: DWARF2 11
+
+Decoded dump of debug contents of section \.debug_line:
+
+CU: dwarf2-11\.c:
+File name  *Line number  *Starting address  *View
+dwarf2-11\.c  *1  *0x4
+dwarf2-11\.c  *2  *0x8
+dwarf2-11\.c  *2  *0x8  *1
diff --git a/gas/testsuite/gas/elf/dwarf2-11.s b/gas/testsuite/gas/elf/dwarf2-11.s
new file mode 100644 (file)
index 0000000..7ec49ae
--- /dev/null
@@ -0,0 +1,28 @@
+/* Test view numbering zero-assert checking with nonzero-sized align.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+       .file "dwarf2-11.c"
+       .text
+       .align 8
+       .globl _start
+_start:
+       .file 1 "dwarf2-11.c"
+       .int 0
+       .loc 1 1 view 0
+       .align 8
+       .loc 1 2 view 0
+       .size _start, .-_start
diff --git a/gas/testsuite/gas/elf/dwarf2-12.d b/gas/testsuite/gas/elf/dwarf2-12.d
new file mode 100644 (file)
index 0000000..a58e374
--- /dev/null
@@ -0,0 +1,15 @@
+#as:
+#readelf: -x.rodata -wL
+#name: DWARF2 12
+
+Hex dump of section '\.rodata':
+  0x00000000 01 *.*
+
+Decoded dump of debug contents of section \.debug_line:
+
+CU: dwarf2-12\.c:
+File name  *Line number  *Starting address  *View
+dwarf2-12\.c  *1  *0
+dwarf2-12\.c  *2  *0
+dwarf2-12\.c  *3  *0  *1
+dwarf2-12\.c  *3  *0x4
diff --git a/gas/testsuite/gas/elf/dwarf2-12.s b/gas/testsuite/gas/elf/dwarf2-12.s
new file mode 100644 (file)
index 0000000..610eeff
--- /dev/null
@@ -0,0 +1,31 @@
+/* Test view numbering forced reset in a single frag.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+       .file "dwarf2-12.c"
+       .text
+       .align 4
+       .globl _start
+_start:
+       .file 1 "dwarf2-12.c"
+       .loc 1 1 view 0
+       .loc 1 2 view -0
+       .loc 1 3 view .L1
+       .int 0
+       .size _start, .-_start
+
+       .section .rodata
+       .uleb128 .L1
diff --git a/gas/testsuite/gas/elf/dwarf2-13.d b/gas/testsuite/gas/elf/dwarf2-13.d
new file mode 100644 (file)
index 0000000..d8b6aba
--- /dev/null
@@ -0,0 +1,15 @@
+#as:
+#readelf: -x.rodata -wL
+#name: DWARF2 13
+
+Hex dump of section '\.rodata':
+  0x00000000 01 *.*
+
+Decoded dump of debug contents of section \.debug_line:
+
+CU: dwarf2-13\.c:
+File name  *Line number  *Starting address  *View
+dwarf2-13\.c  *1  *0x4
+dwarf2-13\.c  *2  *0x8
+dwarf2-13\.c  *3  *0x8  *1
+dwarf2-13\.c  *3  *0xc
diff --git a/gas/testsuite/gas/elf/dwarf2-13.s b/gas/testsuite/gas/elf/dwarf2-13.s
new file mode 100644 (file)
index 0000000..5635b96
--- /dev/null
@@ -0,0 +1,33 @@
+/* Test view numbering forced reset after a nonzero-sized align.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+       .file "dwarf2-13.c"
+       .text
+       .align 8
+       .globl _start
+_start:
+       .file 1 "dwarf2-13.c"
+       .int 0
+       .loc 1 1 view 0
+       .align 8
+       .loc 1 2 view -0
+       .loc 1 3 view .L1
+       .int 0
+       .size _start, .-_start
+
+       .section .rodata
+       .uleb128 .L1
diff --git a/gas/testsuite/gas/elf/dwarf2-14.d b/gas/testsuite/gas/elf/dwarf2-14.d
new file mode 100644 (file)
index 0000000..dfb3c3b
--- /dev/null
@@ -0,0 +1,15 @@
+#as:
+#readelf: -x.rodata -wL
+#name: DWARF2 14
+
+Hex dump of section '\.rodata':
+  0x00000000 01 *.*
+
+Decoded dump of debug contents of section \.debug_line:
+
+CU: dwarf2-14\.c:
+File name  *Line number  *Starting address  *View
+dwarf2-14\.c  *1  *0
+dwarf2-14\.c  *2  *0
+dwarf2-14\.c  *3  *0  *1
+dwarf2-14\.c  *3  *0x4
diff --git a/gas/testsuite/gas/elf/dwarf2-14.s b/gas/testsuite/gas/elf/dwarf2-14.s
new file mode 100644 (file)
index 0000000..115d124
--- /dev/null
@@ -0,0 +1,32 @@
+/* Test view numbering forced reset after a zero-sized align.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+       .file "dwarf2-14.c"
+       .text
+       .align 4
+       .globl _start
+_start:
+       .file 1 "dwarf2-14.c"
+       .loc 1 1 view 0
+       .align 4
+       .loc 1 2 view -0
+       .loc 1 3 view .L1
+       .int 0
+       .size _start, .-_start
+
+       .section .rodata
+       .uleb128 .L1
diff --git a/gas/testsuite/gas/elf/dwarf2-15.d b/gas/testsuite/gas/elf/dwarf2-15.d
new file mode 100644 (file)
index 0000000..eaf50c4
--- /dev/null
@@ -0,0 +1,15 @@
+#as:
+#readelf: -x.rodata -wL
+#name: DWARF2 15
+
+Hex dump of section '\.rodata':
+  0x00000000 01 *.*
+
+Decoded dump of debug contents of section \.debug_line:
+
+CU: dwarf2-15\.c:
+File name  *Line number  *Starting address  *View
+dwarf2-15\.c  *1  *0
+dwarf2-15\.c  *2  *0x4
+dwarf2-15\.c  *3  *0x4  *1
+dwarf2-15\.c  *3  *0x8
diff --git a/gas/testsuite/gas/elf/dwarf2-15.s b/gas/testsuite/gas/elf/dwarf2-15.s
new file mode 100644 (file)
index 0000000..b1b5a58
--- /dev/null
@@ -0,0 +1,32 @@
+/* Test view numbering forced reset in a single frag.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+       .file "dwarf2-15.c"
+       .text
+       .align 8
+       .globl _start
+_start:
+       .file 1 "dwarf2-15.c"
+       .loc 1 1 view 0
+       .int 0
+       .loc 1 2 view -0
+       .loc 1 3 view .L1
+       .int 0
+       .size _start, .-_start
+
+       .section .rodata
+       .uleb128 .L1
diff --git a/gas/testsuite/gas/elf/dwarf2-16.d b/gas/testsuite/gas/elf/dwarf2-16.d
new file mode 100644 (file)
index 0000000..44301a7
--- /dev/null
@@ -0,0 +1,15 @@
+#as:
+#readelf: -x.rodata -wL
+#name: DWARF2 16
+
+Hex dump of section '\.rodata':
+  0x00000000 01 *.*
+
+Decoded dump of debug contents of section \.debug_line:
+
+CU: dwarf2-16\.c:
+File name  *Line number  *Starting address  *View
+dwarf2-16\.c  *1  *0
+dwarf2-16\.c  *2  *0x4
+dwarf2-16\.c  *3  *0x4  *1
+dwarf2-16\.c  *3  *0x8
diff --git a/gas/testsuite/gas/elf/dwarf2-16.s b/gas/testsuite/gas/elf/dwarf2-16.s
new file mode 100644 (file)
index 0000000..54283e8
--- /dev/null
@@ -0,0 +1,33 @@
+/* Test view numbering after a zero-sized align.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+       .file "dwarf2-16.c"
+       .text
+       .align 8
+       .globl _start
+_start:
+       .file 1 "dwarf2-16.c"
+       .loc 1 1 view 0
+       .int 0
+       .loc 1 2 view 0
+       .align 4
+       .loc 1 3 view .L1
+       .int 0
+       .size _start, .-_start
+
+       .section .rodata
+       .uleb128 .L1
diff --git a/gas/testsuite/gas/elf/dwarf2-17.d b/gas/testsuite/gas/elf/dwarf2-17.d
new file mode 100644 (file)
index 0000000..5e7ccdc
--- /dev/null
@@ -0,0 +1,15 @@
+#as:
+#readelf: -x.rodata -wL
+#name: DWARF2 17
+
+Hex dump of section '\.rodata':
+  0x00000000 00 *.*
+
+Decoded dump of debug contents of section \.debug_line:
+
+CU: dwarf2-17\.c:
+File name  *Line number  *Starting address  *View
+dwarf2-17\.c  *1  *0
+dwarf2-17\.c  *2  *0x4
+dwarf2-17\.c  *3  *0x8
+dwarf2-17\.c  *3  *0xc
diff --git a/gas/testsuite/gas/elf/dwarf2-17.s b/gas/testsuite/gas/elf/dwarf2-17.s
new file mode 100644 (file)
index 0000000..ef6c9fd
--- /dev/null
@@ -0,0 +1,33 @@
+/* Test view numbering after a nonzero-sized align.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+       .file "dwarf2-17.c"
+       .text
+       .align 8
+       .globl _start
+_start:
+       .file 1 "dwarf2-17.c"
+       .loc 1 1 view 0
+       .int 0
+       .loc 1 2 view 0
+       .align 8
+       .loc 1 3 view .L1
+       .int 0
+       .size _start, .-_start
+
+       .section .rodata
+       .uleb128 .L1
diff --git a/gas/testsuite/gas/elf/dwarf2-18.d b/gas/testsuite/gas/elf/dwarf2-18.d
new file mode 100644 (file)
index 0000000..d695072
--- /dev/null
@@ -0,0 +1,15 @@
+#as:
+#readelf: -x.rodata -wL
+#name: DWARF2 18
+
+Hex dump of section '\.rodata':
+  0x00000000 0100 *.*
+
+Decoded dump of debug contents of section \.debug_line:
+
+CU: dwarf2-18\.c:
+File name  *Line number  *Starting address  *View
+dwarf2-18\.c  *1  *0
+dwarf2-18\.c  *2  *0  *1
+dwarf2-18\.c  *3  *0x4
+dwarf2-18\.c  *3  *0x8
diff --git a/gas/testsuite/gas/elf/dwarf2-18.s b/gas/testsuite/gas/elf/dwarf2-18.s
new file mode 100644 (file)
index 0000000..643c006
--- /dev/null
@@ -0,0 +1,33 @@
+/* Test view numbering after view-less .loc.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+       .file "dwarf2-18.c"
+       .text
+       .align 8
+       .globl _start
+_start:
+       .file 1 "dwarf2-18.c"
+       .loc 1 1
+       .loc 1 2 view .L1
+       .int 0
+       .loc 1 3 view .L2
+       .int 0
+       .size _start, .-_start
+
+       .section .rodata
+       .uleb128 .L1
+       .uleb128 .L2
diff --git a/gas/testsuite/gas/elf/dwarf2-7.d b/gas/testsuite/gas/elf/dwarf2-7.d
new file mode 100644 (file)
index 0000000..d78d91e
--- /dev/null
@@ -0,0 +1,15 @@
+#as:
+#readelf: -x.rodata -wL
+#name: DWARF2 7
+
+Hex dump of section '\.rodata':
+  0x00000000 01 *.*
+
+Decoded dump of debug contents of section \.debug_line:
+
+CU: dwarf2-7\.c:
+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
diff --git a/gas/testsuite/gas/elf/dwarf2-7.s b/gas/testsuite/gas/elf/dwarf2-7.s
new file mode 100644 (file)
index 0000000..9673cf0
--- /dev/null
@@ -0,0 +1,36 @@
+/* Test view numbering forced reset.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+       .file "dwarf2-7.c"
+       .text
+       .align 4
+       .globl _start
+_start:
+       .file 1 "dwarf2-7.c"
+       .loc 1 1 view 0
+
+       .section .rodata
+       .uleb128 .L1
+
+       .text
+       .globl func
+       .type func, %function
+func:
+       .loc 1 2 view -0
+       .loc 1 3 view .L1
+       .int 0
+       .size func, .-func
diff --git a/gas/testsuite/gas/elf/dwarf2-8.d b/gas/testsuite/gas/elf/dwarf2-8.d
new file mode 100644 (file)
index 0000000..a28d613
--- /dev/null
@@ -0,0 +1,3 @@
+#as:
+#name: DWARF2 8
+#error-output: dwarf2-8.l
diff --git a/gas/testsuite/gas/elf/dwarf2-8.l b/gas/testsuite/gas/elf/dwarf2-8.l
new file mode 100644 (file)
index 0000000..457f648
--- /dev/null
@@ -0,0 +1,2 @@
+[^:]*: Assembler messages:
+[^:]*:26: Error: view number mismatch
diff --git a/gas/testsuite/gas/elf/dwarf2-8.s b/gas/testsuite/gas/elf/dwarf2-8.s
new file mode 100644 (file)
index 0000000..dec0d33
--- /dev/null
@@ -0,0 +1,27 @@
+/* Test view numbering zero-assert checking, same frag.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+       .file "dwarf2-8.c"
+       .text
+       .align 4
+       .globl _start
+_start:
+       .file 1 "dwarf2-8.c"
+       .loc 1 1 view 0
+       .loc 1 2 view 0
+       .int 0
+       .size _start, .-_start
diff --git a/gas/testsuite/gas/elf/dwarf2-9.d b/gas/testsuite/gas/elf/dwarf2-9.d
new file mode 100644 (file)
index 0000000..7e40858
--- /dev/null
@@ -0,0 +1,3 @@
+#as:
+#name: DWARF2 9
+#error-output: dwarf2-9.l
diff --git a/gas/testsuite/gas/elf/dwarf2-9.l b/gas/testsuite/gas/elf/dwarf2-9.l
new file mode 100644 (file)
index 0000000..43eb606
--- /dev/null
@@ -0,0 +1,2 @@
+[^:]*: Assembler messages:
+[^:]*:31: Error: view number mismatch
diff --git a/gas/testsuite/gas/elf/dwarf2-9.s b/gas/testsuite/gas/elf/dwarf2-9.s
new file mode 100644 (file)
index 0000000..c48b942
--- /dev/null
@@ -0,0 +1,32 @@
+/* Test view numbering zero-assert checking, different frag.
+
+   Copyright (C) 2017 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+       .file "dwarf2-9.c"
+       .text
+       .align 4
+       .globl _start
+_start:
+       .file 1 "dwarf2-9.c"
+       .loc 1 1 view 0
+
+       .section .rodata
+       .uleb128 0
+
+       .text
+       .loc 1 2 view 0
+       .int 0
+       .size _start, .-_start
index 199b8fdeb5f6a3c953a4367ce0a502c5a148f708..c33e4fb24f7c10865ed3d6aec7ff555a6d1b799a 100644 (file)
@@ -215,6 +215,18 @@ if { [is_elf_format] } then {
     run_dump_test "dwarf2-4"
     run_dump_test "dwarf2-5"
     run_dump_test "dwarf2-6"
+    run_dump_test "dwarf2-7"
+    run_dump_test "dwarf2-8"
+    run_dump_test "dwarf2-9"
+    run_dump_test "dwarf2-10"
+    run_dump_test "dwarf2-11"
+    run_dump_test "dwarf2-12"
+    run_dump_test "dwarf2-13"
+    run_dump_test "dwarf2-14"
+    run_dump_test "dwarf2-15"
+    run_dump_test "dwarf2-16"
+    run_dump_test "dwarf2-17"
+    run_dump_test "dwarf2-18"
     run_dump_test "bss"
     run_dump_test "bad-bss"
     run_dump_test "bad-section-flag"