| OLD | NEW |
| 1 # Copyright 2009-2012 Free Software Foundation, Inc. | 1 # Copyright 2009-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 load_lib "trace-support.exp"; | 16 load_lib "trace-support.exp"; |
| 17 | 17 |
| 18 if $tracelevel then { | |
| 19 strace $tracelevel | |
| 20 } | |
| 21 | |
| 22 | 18 |
| 23 gdb_exit | 19 gdb_exit |
| 24 gdb_start | 20 gdb_start |
| 25 set testfile "actions" | 21 standard_testfile actions.c |
| 26 set srcfile ${testfile}.c | |
| 27 set binfile $objdir/$subdir/tsv | |
| 28 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ | 22 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ |
| 29 executable {debug nowarnings}] != "" } { | 23 executable {debug nowarnings}] != "" } { |
| 30 untested tsv.exp | 24 untested tsv.exp |
| 31 return -1 | 25 return -1 |
| 32 } | 26 } |
| 33 gdb_load $binfile | 27 gdb_load $binfile |
| 34 | 28 |
| 35 gdb_test "tvariable \$tvar1" \ | 29 gdb_test "tvariable \$tvar1" \ |
| 36 "Trace state variable \\\$tvar1 created, with initial value 0." \ | 30 "Trace state variable \\\$tvar1 created, with initial value 0." \ |
| 37 "Create a trace state variable" | 31 "Create a trace state variable" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 "No trace state variables.*" \ | 83 "No trace state variables.*" \ |
| 90 "List tvariables after deleting all" | 84 "List tvariables after deleting all" |
| 91 | 85 |
| 92 # Now try running a trace. | 86 # Now try running a trace. |
| 93 | 87 |
| 94 runto_main | 88 runto_main |
| 95 gdb_reinitialize_dir $srcdir/$subdir | 89 gdb_reinitialize_dir $srcdir/$subdir |
| 96 | 90 |
| 97 # The rest of the testing needs actual tracing to work. | 91 # The rest of the testing needs actual tracing to work. |
| 98 if { ![gdb_target_supports_trace] } then { | 92 if { ![gdb_target_supports_trace] } then { |
| 99 pass "Current target does not support trace" | 93 unsupported "Current target does not support trace" |
| 100 return 1; | 94 return 1; |
| 101 } | 95 } |
| 102 | 96 |
| 103 # define relative source line numbers: | 97 # define relative source line numbers: |
| 104 # all subsequent line numbers are relative to this first one (baseline) | 98 # all subsequent line numbers are relative to this first one (baseline) |
| 105 | 99 |
| 106 set baseline [gdb_find_recursion_test_baseline $srcfile]; | 100 set baseline [gdb_find_recursion_test_baseline $srcfile]; |
| 107 if { $baseline == -1 } then { | 101 if { $baseline == -1 } then { |
| 108 fail "Could not find gdb_recursion_test function" | 102 fail "Could not find gdb_recursion_test function" |
| 109 return; | 103 return; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 135 |
| 142 gdb_test "print \$tvar5" " = 16" \ | 136 gdb_test "print \$tvar5" " = 16" \ |
| 143 "Print a trace state variable during run" | 137 "Print a trace state variable during run" |
| 144 | 138 |
| 145 gdb_test "tstop" ".*" "" | 139 gdb_test "tstop" ".*" "" |
| 146 | 140 |
| 147 gdb_test "print \$tvar5" " = 16" \ | 141 gdb_test "print \$tvar5" " = 16" \ |
| 148 "Print a trace state variable after run" | 142 "Print a trace state variable after run" |
| 149 | 143 |
| 150 | 144 |
| OLD | NEW |