OLD | NEW |
1 # Copyright 2010-2012 Free Software Foundation, Inc. | 1 # Copyright 2010-2012 Free Software Foundation, Inc. |
2 # | 2 # |
3 # This program is free software; you can redistribute it and/or modify | 3 # This program is free software; you can redistribute it and/or modify |
4 # it under the terms of the GNU General Public License as published by | 4 # it under the terms of the GNU General Public License as published by |
5 # the Free Software Foundation; either version 3 of the License, or | 5 # the Free Software Foundation; either version 3 of the License, or |
6 # (at your option) any later version. | 6 # (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
12 # | 12 # |
13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 |
16 # Test of trace file support. | 16 # Test of trace file support. |
17 | 17 |
18 # Note that unlike most of the tracing tests, this can be run on | 18 # Note that unlike most of the tracing tests, this can be run on |
19 # targets lacking tracepoint support; the program tfile.c has the | 19 # targets lacking tracepoint support; the program tfile.c has the |
20 # ability to generate synthetic trace files directly, and the tfile | 20 # ability to generate synthetic trace files directly, and the tfile |
21 # target is available to all GDB configs. | 21 # target is available to all GDB configs. |
22 | 22 |
23 load_lib "trace-support.exp"; | 23 load_lib "trace-support.exp"; |
24 | 24 |
25 if [target_info exists gdb,nofileio] { | 25 if [target_info exists gdb,nofileio] { |
26 verbose "Skipping tfile.exp because of no fileio capabilities." | 26 verbose "Skipping tfile.exp because of no fileio capabilities." |
27 continue | 27 continue |
28 } | 28 } |
29 | 29 |
30 if $tracelevel then { | |
31 strace $tracelevel | |
32 } | |
33 | |
34 | 30 |
35 gdb_exit | 31 gdb_exit |
36 gdb_start | 32 gdb_start |
37 set testfile "tfile" | 33 standard_testfile |
38 set srcfile ${testfile}.c | |
39 set binfile $objdir/$subdir/$testfile | |
40 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ | 34 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ |
41 executable {debug nowarnings}] != "" } { | 35 executable {debug nowarnings}] != "" } { |
42 untested ${testfile}.exp | 36 untested ${testfile}.exp |
43 return -1 | 37 return -1 |
44 } | 38 } |
45 gdb_reinitialize_dir $srcdir/$subdir | 39 gdb_reinitialize_dir $srcdir/$subdir |
46 | 40 |
47 # Make sure we are starting fresh. | 41 # Make sure we are starting fresh. |
48 remote_file host delete basic.tf | 42 remote_file host delete basic.tf |
49 remote_file host delete error.tf | 43 remote_file host delete error.tf |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 Trace stopped by an error \\(made-up error, tracepoint 1\\).* | 108 Trace stopped by an error \\(made-up error, tracepoint 1\\).* |
115 Collected 0 trace frame.* | 109 Collected 0 trace frame.* |
116 Trace buffer has 256 bytes of 4096 bytes free \\(93% full\\).* | 110 Trace buffer has 256 bytes of 4096 bytes free \\(93% full\\).* |
117 Not looking at any trace frame.*" \ | 111 Not looking at any trace frame.*" \ |
118 "tstatus on error trace file" | 112 "tstatus on error trace file" |
119 | 113 |
120 # Make sure we can reopen without error. | 114 # Make sure we can reopen without error. |
121 gdb_test \ | 115 gdb_test \ |
122 "interpreter-exec mi \"-target-select tfile basic.tf\"" \ | 116 "interpreter-exec mi \"-target-select tfile basic.tf\"" \ |
123 "\\^connected.*" | 117 "\\^connected.*" |
OLD | NEW |