]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - binutils/testsuite/binutils-all/readelf.exp
Display more information when decoding DW_AT_endianity, DW_AT_decimal_sign, DW_AT_def...
[thirdparty/binutils-gdb.git] / binutils / testsuite / binutils-all / readelf.exp
index 81d180922539247893972b97d60569c76fd06d31..10fd8d8da7feb4595576a55f49db0d3d5c05dfca 100644 (file)
@@ -420,14 +420,15 @@ if {![binutils_assemble $srcdir/$subdir/z.s tmpdir/z.o]} then {
     readelf_test {--decompress --hex-dump .debug_loc} $tempfile readelf.z  {}
 }
 
-# Skip the next test for the RISCV architectures because they do not
-# support .ULEB128 pseudo-ops with non-constant values.
+# Skip the next test for the RISCV architectures because they
+# do not support .ULEB128 pseudo-ops with non-constant values.
 if ![istarget "riscv*-*-*"] then {
 
     set hpux ""
     if [istarget "hppa*64*-*-hpux*"] {
        set hpux "--defsym HPUX=1"
     }
+
     # Assemble the DWARF-5 test file.
     if {![binutils_assemble_flags $srcdir/$subdir/dw5.S tmpdir/dw5.o $hpux]} then {
        unresolved "readelf -wiaoRlL dw5 (failed to assemble)"
@@ -447,3 +448,21 @@ if ![istarget "riscv*-*-*"] then {
        readelf_test -wiaoRlL $tempfile dw5.W { nds32*-elf }
     }
 }
+
+# Assemble the DWARF-5 attributes test file.
+if {![binutils_assemble_flags $srcdir/$subdir/dwarf-attributes.S tmpdir/dwarf-attributes.o ""]} then {
+    unresolved "readelf -wi dwarf-attributes (failed to assemble)"
+} else {
+    # Download it.
+    if ![is_remote host] {
+       set tempfile tmpdir/dwarf-attributes.o
+    } else {
+       set tempfile [remote_download host tmpdir/dwarf-attributes.o]
+    }
+
+    # First, determine the size, so specific output matchers can be used.
+    readelf_find_size $tempfile
+
+    # Make sure that readelf can decode the contents.
+    readelf_test -wi $tempfile dwarf-attributes.W {}
+}