aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-07-05 18:04:33 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-07-05 18:04:33 +0000
commit4e5799b6d29933e9ab11242b2bceac908aedf49d (patch)
tree6292f092af7dc61d5c916295cda2ef79ffb94c51 /gdb/testsuite
parent1a219cc7417a257cf173ccb36f96dad4c36e471e (diff)
downloadgdb-4e5799b6d29933e9ab11242b2bceac908aedf49d.zip
gdb-4e5799b6d29933e9ab11242b2bceac908aedf49d.tar.gz
gdb-4e5799b6d29933e9ab11242b2bceac908aedf49d.tar.bz2
gdb/
Fix re-run of PIE executable, PR shlibs/11776. * solib-svr4.c (svr4_relocate_main_executable) <symfile_objfile>: Remove the part of pre-set SYMFILE_OBJFILE->SECTION_OFFSETS. gdb/testsuite/ Fix re-run of PIE executable, PR shlibs/11776. * gdb.base/break-interp.exp (test_ld): Turn off "disable-randomization". Remove $displacement_main to match the solib-svr4.c change. New "kill" and re-"run" of the inferior.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog8
-rw-r--r--gdb/testsuite/gdb.base/break-interp.exp11
2 files changed, 19 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index ced176c..f1b58b4 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,6 +1,14 @@
2010-07-05 Jan Kratochvil <jan.kratochvil@redhat.com>
Joel Brobecker <brobecker@adacore.com>
+ Fix re-run of PIE executable, PR shlibs/11776.
+ * gdb.base/break-interp.exp (test_ld): Turn off "disable-randomization".
+ Remove $displacement_main to match the solib-svr4.c change. New "kill"
+ and re-"run" of the inferior.
+
+2010-07-05 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Joel Brobecker <brobecker@adacore.com>
+
Cope with missing /usr/sbin/prelink.
* lib/prelink-support.exp (prelink_no):
<result == 1 && $output is "no such file or directory">: New.
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index a3b9c20..5039bcb 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -337,6 +337,11 @@ proc test_ld {file ifmain trynosym displacement} {
# Print the "PIE (Position Independent Executable) displacement" message.
gdb_test_no_output "set verbose on"
+ # We want to test the re-run of a PIE in the case where the executable
+ # is loaded with a different displacement, but disable-randomization
+ # prevents that from happening. So turn it off.
+ gdb_test "set disable-randomization off"
+
reach "dl_main" "run segv" $displacement
gdb_test "bt" "#0 +\[^\r\n\]*\\mdl_main\\M.*" "dl bt"
@@ -347,7 +352,13 @@ proc test_ld {file ifmain trynosym displacement} {
reach "libfunc" continue "NONE"
gdb_test "bt" "#0 +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n#1 +\[^\r\n\]*\\mmain\\M.*" "main bt"
+ }
+ # Try re-run if the new PIE displacement takes effect.
+ gdb_test "kill" "" "kill" {Kill the program being debugged\? \(y or n\) } "y"
+ reach "dl_main" "run segv" $displacement
+
+ if $ifmain {
test_core $file $displacement
test_attach $file $displacement