aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite/binutils-all/readelf.exp
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-10-11 12:02:51 +0100
committerNick Clifton <nickc@redhat.com>2017-10-11 12:02:51 +0100
commit04914e3707e210a071b3af3c52cc5e5b2ad41a61 (patch)
treed93bbb6483de286ac3e896cb5f861ba20766306c /binutils/testsuite/binutils-all/readelf.exp
parent7fa29be949a96f68ee65dcdb4f56f132609170db (diff)
downloadgdb-04914e3707e210a071b3af3c52cc5e5b2ad41a61.zip
gdb-04914e3707e210a071b3af3c52cc5e5b2ad41a61.tar.gz
gdb-04914e3707e210a071b3af3c52cc5e5b2ad41a61.tar.bz2
Display more information when decoding DW_AT_endianity, DW_AT_decimal_sign, DW_AT_defaulted and DW_AT_discr_list DWARF attributes.
* dwarf.c (read_and_display_attr_value): Handle DW_AT_endianity, DW_END_default, DW_END_big, DW_END_little, DW_ATE_UCS, DW_ATE_ASCII, DW_CC_pass_by_reference, DW_CC_pass_by_value, DW_CC_GNU_renesas_sh, DW_CC_GNU_borland_fastcall_i386, DW_AT_decimal_sign, DW_AT_defaulted, DW_AT_discr_list. (get_TAG_name): Report user generated tag values. * testsuite/binutils-all/dwarf-attributes.S: New test. * testsuite/binutils-all/dwarf-attributes.W. Expected output from readelf. * testsuite/binutils-all/readelf.exp: Run the new test.
Diffstat (limited to 'binutils/testsuite/binutils-all/readelf.exp')
-rw-r--r--binutils/testsuite/binutils-all/readelf.exp23
1 files changed, 21 insertions, 2 deletions
diff --git a/binutils/testsuite/binutils-all/readelf.exp b/binutils/testsuite/binutils-all/readelf.exp
index 81d1809..10fd8d8 100644
--- a/binutils/testsuite/binutils-all/readelf.exp
+++ b/binutils/testsuite/binutils-all/readelf.exp
@@ -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 {}
+}