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.
This commit is contained in:
Yao Qi 2012-04-16 11:29:08 +00:00
parent 42476b702c
commit c0d4d1c0f8
10 changed files with 37 additions and 12 deletions

View 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

View 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 \

View 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
}

View 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"

View 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

View 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" } {

View 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" } {

View 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]] != "" } {

View 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
}

View 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
}
}