aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-10-11 08:45:12 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-10-11 08:45:12 +0000
commit5e533c94a6e360da727240bcc8d21fdcffd8d5d4 (patch)
treef119abe4ad872e8437d590f19ed0634f5c9154da /gdb
parent65646555b2f618d48420b5a786a1e7c86f8ad36f (diff)
downloadfsf-binutils-gdb-5e533c94a6e360da727240bcc8d21fdcffd8d5d4.zip
fsf-binutils-gdb-5e533c94a6e360da727240bcc8d21fdcffd8d5d4.tar.gz
fsf-binutils-gdb-5e533c94a6e360da727240bcc8d21fdcffd8d5d4.tar.bz2
gdb/testsuite/
Fix results of prelinked PIEs on ppc*. * gdb.base/break-interp.exp (reach, test_core, test_attach_gdb): Accept also DISPLACEMENT "PRESENT". (main): Replace "ZERO" displacements by "PRESENT".
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.base/break-interp.exp23
2 files changed, 23 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 9b34199..e01dd40 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-11 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix results of prelinked PIEs on ppc*.
+ * gdb.base/break-interp.exp (reach, test_core, test_attach_gdb):
+ Accept also DISPLACEMENT "PRESENT".
+ (main): Replace "ZERO" displacements by "PRESENT".
+
2010-10-08 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/oranking.exp: New test.
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index 6566baa..c00db63 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -109,7 +109,9 @@ proc strip_debug {dest} {
}
# `runto' does not check we stopped really at the function we specified.
-# DISPLACEMENT can be "NONE", "ZERO" or "NONZERO"
+# DISPLACEMENT can be "NONE" for no message to be present, "ZERO" for
+# displacement of 0 bytes to be present, "NONZERO" for displacement of non-0
+# bytes to be present and "PRESENT" if both "ZERO" and "NONZERO" are valid.
proc reach {func command displacement} {
global gdb_prompt expect_out
@@ -128,7 +130,7 @@ proc reach {func command displacement} {
} else {
set case "NONZERO"
}
- if {$displacement == $case} {
+ if {$displacement == $case || $displacement == "PRESENT"} {
pass $test_displacement
set displacement "FOUND-$displacement"
} else {
@@ -184,7 +186,7 @@ proc test_core {file displacement} {
} else {
set case "NONZERO"
}
- if {$displacement == $case} {
+ if {$displacement == $case || $displacement == "PRESENT"} {
pass $test_displacement
set displacement "FOUND-$displacement"
} else {
@@ -241,7 +243,7 @@ proc test_attach_gdb {file pid displacement prefix} {
} else {
set case "NONZERO"
}
- if {$displacement == $case} {
+ if {$displacement == $case || $displacement == "PRESENT"} {
pass $test_displacement
set displacement "FOUND-$displacement"
} else {
@@ -428,7 +430,7 @@ proc test_ld {file ifmain trynosym displacement} {
} else {
set case "NONZERO"
}
- if {$displacement == $case} {
+ if {$displacement == $case || $displacement == "PRESENT"} {
pass $test_displacement
set displacement "FOUND-$displacement"
} else {
@@ -533,7 +535,10 @@ foreach ldprelink {NO YES} {
if {$ldprelink == "NO"} {
set displacement "NONZERO"
} else {
- set displacement "ZERO"
+ # x86* kernel loads prelinked PIE binary at its prelinked address
+ # but ppc* kernel loads it at a random address. prelink normally
+ # skips PIE binaries during the system scan.
+ set displacement "PRESENT"
}
test_ld $interp 0 [expr {$ldsepdebug == "NO"}] $displacement
@@ -582,7 +587,11 @@ foreach ldprelink {NO YES} {
} elseif {$binprelink == "NO"} {
set displacement "NONZERO"
} else {
- set displacement "ZERO"
+ # x86* kernel loads prelinked PIE binary at its
+ # prelinked address but ppc* kernel loads it at
+ # a random address. prelink normally skips PIE
+ # binaries during the system scan.
+ set displacement "PRESENT"
}
if {[prelink$binprelink $relink_args [file tail $exec]]