aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-01-08 22:59:47 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-01-08 22:59:47 +0000
commitd521f563333718f9dad11ab206d81989c9a8c1e8 (patch)
tree210aae7cdfa1bbf41d832bff952d506e3ff68d0c /gdb/testsuite
parent75242ef48d5510349fe853a148a130f6d225f6c9 (diff)
downloadgdb-d521f563333718f9dad11ab206d81989c9a8c1e8.zip
gdb-d521f563333718f9dad11ab206d81989c9a8c1e8.tar.gz
gdb-d521f563333718f9dad11ab206d81989c9a8c1e8.tar.bz2
gdb/testsuite/
Workaround PR binutils/10802. * lib/gdb.exp (gdb_gnu_strip_debug): Preserve the file attributes (twice).
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/lib/gdb.exp12
2 files changed, 17 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 9c36efb..bf2c0ff 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-08 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Workaround PR binutils/10802.
+ * lib/gdb.exp (gdb_gnu_strip_debug): Preserve the file attributes
+ (twice).
+
2010-01-08 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.cp/gdb2495.exp: Skip if gdb,nosignals.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index fcaaf3c..2604b9f 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2845,6 +2845,11 @@ proc gdb_gnu_strip_debug { dest args } {
return 1
}
+ # Workaround PR binutils/10802:
+ # Preserve the 'x' bit also for PIEs (Position Independent Executables).
+ set perm [file attributes ${dest} -permissions]
+ file attributes ${stripped_file} -permissions $perm
+
# Get rid of everything but the debug info, and store result in debug_file
# This will be in the .debug subdirectory, see above.
set result [catch "exec $strip_to_file_program --only-keep-debug ${dest} -o ${debug_file}" output]
@@ -2881,7 +2886,12 @@ proc gdb_gnu_strip_debug { dest args } {
return 1
}
- return 0
+ # Workaround PR binutils/10802:
+ # Preserve the 'x' bit also for PIEs (Position Independent Executables).
+ set perm [file attributes ${stripped_file} -permissions]
+ file attributes ${dest} -permissions $perm
+
+ return 0
}
# Test the output of GDB_COMMAND matches the pattern obtained