aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-08-09 17:58:38 +0000
committerDoug Evans <dje@google.com>2013-08-09 17:58:38 +0000
commitf61d552978fd9cb81a544254fac6deafbe953590 (patch)
tree49de51ca55ef3d482b7bd4711742b4dc570a466b
parentc0cd8254636caeec480710218ae639b7a077c534 (diff)
downloadgdb-f61d552978fd9cb81a544254fac6deafbe953590.zip
gdb-f61d552978fd9cb81a544254fac6deafbe953590.tar.gz
gdb-f61d552978fd9cb81a544254fac6deafbe953590.tar.bz2
* lib/future.exp (gdb_find_ldd): New proc.
* lib/prelink-support.exp (build_executable_own_libs): Call it. Make "/usr/sbin/" in prelink path optional.
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/lib/future.exp10
-rw-r--r--gdb/testsuite/lib/prelink-support.exp5
3 files changed, 19 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 0b681f4..7a43b73 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2013-08-09 Doug Evans <dje@google.com>
+
+ * lib/future.exp (gdb_find_ldd): New proc.
+ * lib/prelink-support.exp (build_executable_own_libs): Call it.
+ Make "/usr/sbin/" in prelink path optional.
+
2013-08-09 Yao Qi <yao@codesourcery.com>
* gdb.trace/collection.exp (gdb_collect_args_test): Set
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
index 5d53e93..422342b 100644
--- a/gdb/testsuite/lib/future.exp
+++ b/gdb/testsuite/lib/future.exp
@@ -84,6 +84,16 @@ proc gdb_find_go_linker {} {
return [find_go]
}
+proc gdb_find_ldd {} {
+ global LDD_FOR_TARGET
+ if [info exists LDD_FOR_TARGET] {
+ set ldd $LDD_FOR_TARGET
+ } else {
+ set ldd "ldd"
+ }
+ return $ldd
+}
+
proc gdb_default_target_compile {source destfile type options} {
global target_triplet
global tool_root_dir
diff --git a/gdb/testsuite/lib/prelink-support.exp b/gdb/testsuite/lib/prelink-support.exp
index ef99783..fca7aa4c 100644
--- a/gdb/testsuite/lib/prelink-support.exp
+++ b/gdb/testsuite/lib/prelink-support.exp
@@ -124,7 +124,8 @@ proc build_executable_own_libs {testname executable sources options {interp ""}
}
set binfile ${objdir}/${subdir}/${executable}
- set command "ldd $binfile"
+ set ldd [gdb_find_ldd]
+ set command "$ldd $binfile"
set test "ldd $executable"
set result [catch "exec $command" output]
verbose -log "result of $command is $result"
@@ -235,7 +236,7 @@ proc prelink_no {arg {name {}}} {
}
# Last line does miss the trailing \n. There can be multiple such messages
# as ARG may list multiple files.
- if {$result == 1 && [regexp {^(/usr/sbin/prelink[^\r\n]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
+ if {$result == 1 && [regexp {^([^\r\n]*prelink[^\r\n]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
pass $test
return 1
} else {