gdb/testsuite/
authorYao Qi <yao@codesourcery.com>
Mon, 16 Apr 2012 11:29:08 +0000 (11:29 +0000)
committerYao Qi <yao@codesourcery.com>
Mon, 16 Apr 2012 11:29:08 +0000 (11:29 +0000)
* 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.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/change-loc.exp
gdb/testsuite/gdb.trace/ftrace.exp
gdb/testsuite/gdb.trace/pending.exp
gdb/testsuite/gdb.trace/strace.exp
gdb/testsuite/gdb.trace/trace-break.exp
gdb/testsuite/gdb.trace/trace-mt.exp
gdb/testsuite/gdb.trace/tspeed.exp
gdb/testsuite/gdb.trace/tstatus.exp
gdb/testsuite/lib/trace-support.exp

index a4acfd8..c276178 100644 (file)
@@ -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
index db9bdbd..ef8ab45 100644 (file)
@@ -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 \
index 70a8f0f..634d77b 100644 (file)
@@ -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
 }
index 4e7dc31..018ded2 100644 (file)
@@ -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"
index 88039ff..00fca8a 100644 (file)
@@ -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
 
index 6c5e43a..2d19511 100644 (file)
@@ -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" } {
index 961c934..d6b619c 100644 (file)
@@ -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" } {
index b6e6eca..5f7f36d 100644 (file)
@@ -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]] != "" } {
index 1146e1f..5c4055b 100644 (file)
@@ -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
 }
index ef28ec8..35a8a9d 100644 (file)
@@ -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
+    }
+}