* 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 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
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 \
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
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
}
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"
set binfile $objdir/$subdir/$testfile
set executable $testfile
-set libipa $objdir/../gdbserver/libinproctrace.so
+set libipa [get_in_proc_agent]
set lib_opts debug
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
}
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" } {
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.
}
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" } {
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]] != "" } {
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
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
}
}
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
+ }
+}