aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-12-03 13:57:56 +0000
committerNick Clifton <nickc@redhat.com>2013-12-03 13:57:56 +0000
commit11a6da561751f4fd91ae64c2d51c2cd8166cad1e (patch)
tree384b6d6621f38ab0ecca8c68c183baec910243bf /binutils
parentca8941bbd088002cb8ff87abe16d02ecc8d58d1e (diff)
downloadgdb-11a6da561751f4fd91ae64c2d51c2cd8166cad1e.zip
gdb-11a6da561751f4fd91ae64c2d51c2cd8166cad1e.tar.gz
gdb-11a6da561751f4fd91ae64c2d51c2cd8166cad1e.tar.bz2
* peXXigen.c (pe_print_resource_entries): New function: Displays
an entry in a .rsrc section. (pe_print_resource_directory): New function: Displays a directory in a .rsrc section. (pe_print_rsrc): New function: Displays the contents of .rsrc section. (_bfd_XX_print_private_bfd_data_common): Call pe_print_rsrc. * binutils-all/windres/windres.exp: Run for x86_64-pc-cygwin. Add test of "objump -p" output.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/testsuite/ChangeLog5
-rw-r--r--binutils/testsuite/binutils-all/windres/windres.exp39
2 files changed, 43 insertions, 1 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 67c7260..693a144 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-03 Nick Clifton <nickc@redhat.com>
+
+ * binutils-all/windres/windres.exp: Run for x86_64-pc-cygwin.
+ Add test of "objump -p" output.
+
2013-11-27 Matthew Fortune <matthew.fortune@imgtec.com>
* binutils-all/objcopy.exp: Consider mips-mti-elf the same as
diff --git a/binutils/testsuite/binutils-all/windres/windres.exp b/binutils/testsuite/binutils-all/windres/windres.exp
index 2ef73ff..9f8dd25 100644
--- a/binutils/testsuite/binutils-all/windres/windres.exp
+++ b/binutils/testsuite/binutils-all/windres/windres.exp
@@ -19,15 +19,18 @@
# Written by DJ Delorie <dj@redhat.com>
-if {![istarget "i*86-*-*"] && ![istarget "x86_64-*-mingw*"] } {
+if {![istarget "i*86-*-*"] && ![istarget "x86_64-*-mingw*"] && ![istarget "x86_64-*-cygwin"] } {
+ verbose "Not a Cygwin/Mingw target" 1
return
}
if {![info exists WINDRES]} then {
+ verbose "WINDRES not defined" 1
return
}
if {[which $WINDRES] == 0} then {
+ verbose "$WINDRES not found" 1
return
}
@@ -139,3 +142,37 @@ foreach res $res_list {
file delete "tmpdir/$broot.dump"
}
}
+
+# Test objdump -p
+
+if {[which $OBJDUMP] == 0} then {
+ unsupported "objdump -p"
+ return
+}
+
+verbose "$wr $cpp_opts -J rc $srcdir/$subdir/version.rc tmpdir/version.o" 1
+catch "exec $wr $cpp_opts -J rc $srcdir/$subdir/version.rc tmpdir/version.o" err
+
+if ![string match "" $err] then {
+ send_log "$err\n"
+ verbose "$err" 1
+ if [string match "*windows.h: No such file*" $err] then {
+ unsupported "objdump -p (no header files found)"
+ } else {
+ fail "objdump -p (build)"
+ }
+ continue
+}
+
+set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -p tmpdir/version.o"]
+
+# FIXME: We should extend this regexp to check for more information.
+set want ".*The .rsrc Resource Directory section.*Type Table:.*Entry: ID:.*Name Table:.*Entry: ID:.*Language Table:.*Entry: ID:.*"
+
+if ![regexp $want $got] then {
+ fail "objdump -p"
+} else {
+ pass "objdump -p"
+}
+
+# file delete "tmpdir/version.o"