aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2012-04-16 11:29:08 +0000
committerYao Qi <yao@codesourcery.com>2012-04-16 11:29:08 +0000
commitc0d4d1c0f81b3452286bdb9e30ede03706ba0a9f (patch)
tree3a063abdf0bef36a3b3c209fe968a8ae3c2402c8
parent42476b702c78006853f79b2013af919c313c1f7a (diff)
downloadgdb-c0d4d1c0f81b3452286bdb9e30ede03706ba0a9f.zip
gdb-c0d4d1c0f81b3452286bdb9e30ede03706ba0a9f.tar.gz
gdb-c0d4d1c0f81b3452286bdb9e30ede03706ba0a9f.tar.bz2
gdb/testsuite/
* lib/trace-support.exp (get_in_proc_agent): New. * gdb.trace/change-loc.exp: Call get_in_proc_agent to get the location of in process trace agent. * gdb.trace/ftrace.exp: Likewise. * gdb.trace/pending.exp: Likewise. * gdb.trace/trace-break.exp: Likewise. * gdb.trace/trace-mt.exp * gdb.trace/tspeed.exp: Likewise. * gdb.trace/tstatus.exp * gdb.trace/strace.exp: Likewise.
-rw-r--r--gdb/testsuite/ChangeLog13
-rw-r--r--gdb/testsuite/gdb.trace/change-loc.exp2
-rw-r--r--gdb/testsuite/gdb.trace/ftrace.exp4
-rw-r--r--gdb/testsuite/gdb.trace/pending.exp2
-rw-r--r--gdb/testsuite/gdb.trace/strace.exp2
-rw-r--r--gdb/testsuite/gdb.trace/trace-break.exp4
-rw-r--r--gdb/testsuite/gdb.trace/trace-mt.exp4
-rw-r--r--gdb/testsuite/gdb.trace/tspeed.exp2
-rw-r--r--gdb/testsuite/gdb.trace/tstatus.exp4
-rw-r--r--gdb/testsuite/lib/trace-support.exp12
10 files changed, 37 insertions, 12 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index a4acfd8..c276178 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,16 @@
+2012-04-16 Yao Qi <yao@codesourcery.com>
+
+ * lib/trace-support.exp (get_in_proc_agent): New.
+ * gdb.trace/change-loc.exp: Call get_in_proc_agent to get the location
+ of in process trace agent.
+ * gdb.trace/ftrace.exp: Likewise.
+ * gdb.trace/pending.exp: Likewise.
+ * gdb.trace/trace-break.exp: Likewise.
+ * gdb.trace/trace-mt.exp
+ * gdb.trace/tspeed.exp: Likewise.
+ * gdb.trace/tstatus.exp
+ * gdb.trace/strace.exp: Likewise.
+
2012-04-16 Thomas Schwinge <thomas@codesourcery.com>
* gdb.asm/sh.inc (gdbasm_startup): Only set up the stack pointer if the
diff --git a/gdb/testsuite/gdb.trace/change-loc.exp b/gdb/testsuite/gdb.trace/change-loc.exp
index db9bdbd..ef8ab45 100644
--- a/gdb/testsuite/gdb.trace/change-loc.exp
+++ b/gdb/testsuite/gdb.trace/change-loc.exp
@@ -275,7 +275,7 @@ tracepoint_change_loc_1 "trace"
tracepoint_change_loc_2 "trace"
# Re-compile test case with IPA.
-set libipa $objdir/../gdbserver/libinproctrace.so
+set libipa [get_in_proc_agent]
gdb_load_shlibs $libipa
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable \
diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp
index 70a8f0f..634d77b 100644
--- a/gdb/testsuite/gdb.trace/ftrace.exp
+++ b/gdb/testsuite/gdb.trace/ftrace.exp
@@ -39,7 +39,7 @@ if ![gdb_target_supports_trace] {
return -1
}
-set libipa $objdir/../gdbserver/libinproctrace.so
+set libipa [get_in_proc_agent]
gdb_load_shlibs $libipa
# Can't use prepare_for_testing, because that splits compiling into
@@ -166,7 +166,7 @@ proc test_fast_tracepoints {} {
gdb_reinitialize_dir $srcdir/$subdir
-if { [gdb_test "info sharedlibrary" ".*libinproctrace\.so.*" "IPA loaded"] != 0 } {
+if { [gdb_test "info sharedlibrary" ".*${libipa}.*" "IPA loaded"] != 0 } {
untested "Could not find IPA lib loaded"
return 1
}
diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp
index 4e7dc31..018ded2 100644
--- a/gdb/testsuite/gdb.trace/pending.exp
+++ b/gdb/testsuite/gdb.trace/pending.exp
@@ -499,7 +499,7 @@ pending_tracepoint_with_action_resolved "trace"
pending_tracepoint_installed_during_trace "trace"
# Re-compile test case with IPA.
-set libipa $objdir/../gdbserver/libinproctrace.so
+set libipa [get_in_proc_agent]
gdb_load_shlibs $libipa
lappend exec_opts "shlib=$libipa"
diff --git a/gdb/testsuite/gdb.trace/strace.exp b/gdb/testsuite/gdb.trace/strace.exp
index 88039ff..00fca8a 100644
--- a/gdb/testsuite/gdb.trace/strace.exp
+++ b/gdb/testsuite/gdb.trace/strace.exp
@@ -23,7 +23,7 @@ set srcfile $testfile.c
set binfile $objdir/$subdir/$testfile
set executable $testfile
-set libipa $objdir/../gdbserver/libinproctrace.so
+set libipa [get_in_proc_agent]
set lib_opts debug
diff --git a/gdb/testsuite/gdb.trace/trace-break.exp b/gdb/testsuite/gdb.trace/trace-break.exp
index 6c5e43a..2d19511 100644
--- a/gdb/testsuite/gdb.trace/trace-break.exp
+++ b/gdb/testsuite/gdb.trace/trace-break.exp
@@ -352,7 +352,7 @@ foreach at_first_loc { "1" "0" } {
break_trace_same_addr_6 "trace" "enable" "trace" "disable"
break_trace_same_addr_6 "trace" "disable" "trace" "enable"
-set libipa $objdir/../gdbserver/libinproctrace.so
+set libipa [get_in_proc_agent]
gdb_load_shlibs $libipa
# Can't use prepare_for_testing, because that splits compiling into
@@ -372,7 +372,7 @@ if ![runto_main] {
}
gdb_reinitialize_dir $srcdir/$subdir
-if { [gdb_test "info sharedlibrary" ".*libinproctrace\.so.*" "IPA loaded"] != 0 } {
+if { [gdb_test "info sharedlibrary" ".*${libipa}.*" "IPA loaded"] != 0 } {
untested "Could not find IPA lib loaded"
} else {
foreach break_always_inserted { "on" "off" } {
diff --git a/gdb/testsuite/gdb.trace/trace-mt.exp b/gdb/testsuite/gdb.trace/trace-mt.exp
index 961c934..d6b619c 100644
--- a/gdb/testsuite/gdb.trace/trace-mt.exp
+++ b/gdb/testsuite/gdb.trace/trace-mt.exp
@@ -108,7 +108,7 @@ foreach break_always_inserted { "on" "off" } {
step_over_tracepoint "trace"
-set libipa $objdir/../gdbserver/libinproctrace.so
+set libipa [get_in_proc_agent]
gdb_load_shlibs $libipa
# Compile test case again with IPA.
@@ -125,7 +125,7 @@ if ![runto_main] {
}
gdb_reinitialize_dir $srcdir/$subdir
-if { [gdb_test "info sharedlibrary" ".*libinproctrace\.so.*" "IPA loaded"] != 0 } {
+if { [gdb_test "info sharedlibrary" ".*${libipa}.*" "IPA loaded"] != 0 } {
untested "Could not find IPA lib loaded"
} else {
foreach break_always_inserted { "on" "off" } {
diff --git a/gdb/testsuite/gdb.trace/tspeed.exp b/gdb/testsuite/gdb.trace/tspeed.exp
index b6e6eca..5f7f36d 100644
--- a/gdb/testsuite/gdb.trace/tspeed.exp
+++ b/gdb/testsuite/gdb.trace/tspeed.exp
@@ -20,7 +20,7 @@ set srcfile ${testfile}.c
set executable $testfile
set binfile $objdir/$subdir/$executable
-set ipalib $objdir/../gdbserver/libinproctrace.so
+set ipalib [get_in_proc_agent]
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
executable [concat {debug nowarnings c} libs=$ipalib]] != "" } {
diff --git a/gdb/testsuite/gdb.trace/tstatus.exp b/gdb/testsuite/gdb.trace/tstatus.exp
index 1146e1f..5c4055b 100644
--- a/gdb/testsuite/gdb.trace/tstatus.exp
+++ b/gdb/testsuite/gdb.trace/tstatus.exp
@@ -36,7 +36,7 @@ if ![gdb_target_supports_trace] {
return -1
}
-set libipa $objdir/../gdbserver/libinproctrace.so
+set libipa [get_in_proc_agent]
gdb_load_shlibs $libipa
# Can't use prepare_for_testing, because that splits compiling into
@@ -166,7 +166,7 @@ proc test_tracepoints {} {
gdb_reinitialize_dir $srcdir/$subdir
-if { [gdb_test "info sharedlibrary" ".*libinproctrace\.so.*" "IPA loaded"] != 0 } {
+if { [gdb_test "info sharedlibrary" ".*${libipa}.*" "IPA loaded"] != 0 } {
untested "Could not find IPA lib loaded"
return 1
}
diff --git a/gdb/testsuite/lib/trace-support.exp b/gdb/testsuite/lib/trace-support.exp
index ef28ec8..35a8a9d 100644
--- a/gdb/testsuite/lib/trace-support.exp
+++ b/gdb/testsuite/lib/trace-support.exp
@@ -301,3 +301,15 @@ proc gdb_find_recursion_test_baseline { filename } {
}
return $baseline;
}
+
+# Return the location of the IPA library.
+
+proc get_in_proc_agent {} {
+ global objdir
+
+ if [target_info exists in_proc_agent] {
+ return [target_info in_proc_agent]
+ } else {
+ return $objdir/../gdbserver/libinproctrace.so
+ }
+}