OLD | NEW |
1 # Copyright 2011-2012 Free Software Foundation, Inc. | 1 # Copyright 2011-2012 Free Software Foundation, Inc. |
2 # This program is free software; you can redistribute it and/or modify | 2 # This program is free software; you can redistribute it and/or modify |
3 # it under the terms of the GNU General Public License as published by | 3 # it under the terms of the GNU General Public License as published by |
4 # the Free Software Foundation; either version 3 of the License, or | 4 # the Free Software Foundation; either version 3 of the License, or |
5 # (at your option) any later version. | 5 # (at your option) any later version. |
6 # | 6 # |
7 # This program is distributed in the hope that it will be useful, | 7 # This program is distributed in the hope that it will be useful, |
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 # GNU General Public License for more details. | 10 # GNU General Public License for more details. |
11 # | 11 # |
12 # You should have received a copy of the GNU General Public License | 12 # You should have received a copy of the GNU General Public License |
13 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 13 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
14 | 14 |
15 load_lib "trace-support.exp" | 15 load_lib "trace-support.exp" |
16 | 16 |
17 set testfile "actions" | 17 standard_testfile actions.c |
18 set executable $testfile | 18 set executable $testfile |
19 set srcfile $testfile.c | |
20 set binfile $objdir/$subdir/$testfile | |
21 set expfile tstatus.exp | 19 set expfile tstatus.exp |
22 | 20 |
23 if [prepare_for_testing $expfile $executable $srcfile \ | 21 if [prepare_for_testing $expfile $executable $srcfile \ |
24 [list debug]] { | 22 [list debug]] { |
25 untested "failed to prepare for trace tests" | 23 untested "failed to prepare for trace tests" |
26 return -1 | 24 return -1 |
27 } | 25 } |
28 | 26 |
29 if ![runto_main] { | 27 if ![runto_main] { |
30 fail "Can't run to main to check for trace support" | 28 fail "Can't run to main to check for trace support" |
31 return -1 | 29 return -1 |
32 } | 30 } |
33 | 31 |
34 if ![gdb_target_supports_trace] { | 32 if ![gdb_target_supports_trace] { |
35 unsupported "target does not support trace" | 33 unsupported "target does not support trace" |
36 return -1 | 34 return -1 |
37 } | 35 } |
38 | 36 |
39 set libipa $objdir/../gdbserver/libinproctrace.so | 37 set libipa [get_in_proc_agent] |
40 gdb_load_shlibs $libipa | 38 gdb_load_shlibs $libipa |
41 | 39 |
42 # Can't use prepare_for_testing, because that splits compiling into | 40 # Can't use prepare_for_testing, because that splits compiling into |
43 # building objects and then linking, and we'd fail with "linker input | 41 # building objects and then linking, and we'd fail with "linker input |
44 # file unused because linking not done" when building the object. | 42 # file unused because linking not done" when building the object. |
45 | 43 |
46 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ | 44 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ |
47 executable [list debug shlib=$libipa] ] != "" } { | 45 executable [list debug shlib=$libipa] ] != "" } { |
48 untested "failed to compile ftrace tests" | 46 untested "failed to compile ftrace tests" |
49 return -1 | 47 return -1 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 "" \ | 157 "" \ |
160 "collect globvar, anarg" "^$" | 158 "collect globvar, anarg" "^$" |
161 } | 159 } |
162 | 160 |
163 run_trace_experiment | 161 run_trace_experiment |
164 | 162 |
165 } | 163 } |
166 | 164 |
167 gdb_reinitialize_dir $srcdir/$subdir | 165 gdb_reinitialize_dir $srcdir/$subdir |
168 | 166 |
169 if { [gdb_test "info sharedlibrary" ".*libinproctrace\.so.*" "IPA loaded"] != 0
} { | 167 if { [gdb_test "info sharedlibrary" ".*${libipa}.*" "IPA loaded"] != 0 } { |
170 untested "Could not find IPA lib loaded" | 168 untested "Could not find IPA lib loaded" |
171 return 1 | 169 return 1 |
172 } | 170 } |
173 | 171 |
174 test_tracepoints | 172 test_tracepoints |
OLD | NEW |