Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: gdb/testsuite/gdb.reverse/consecutive-precsave.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2008-2012 Free Software Foundation, Inc. 1 # Copyright 2008-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 # This file is part of the GDB testsuite. It tests stepping over 16 # This file is part of the GDB testsuite. It tests stepping over
17 # consecutive instructions in a process record logfile. 17 # consecutive instructions in a process record logfile.
18 18
19 # This test suitable only for process record-replay 19 # This test suitable only for process record-replay
20 if ![supports_process_record] { 20 if ![supports_process_record] {
21 return 21 return
22 } 22 }
23 23
24 set testfile "consecutive-reverse" 24 standard_testfile consecutive-reverse.c
25 set srcfile ${testfile}.c 25 set precsave [standard_output_file consecutive.precsave]
26 26
27 if { [prepare_for_testing $testfile.exp $testfile $srcfile] } { 27 if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
28 return -1 28 return -1
29 } 29 }
30 30
31 runto main 31 runto main
32 32
33 if [supports_process_record] { 33 if [supports_process_record] {
34 # Activate process record/replay 34 # Activate process record/replay
35 gdb_test_no_output "record" "Turn on process record" 35 gdb_test_no_output "record" "Turn on process record"
36 } 36 }
37 37
38 set end_location [gdb_get_line_number "end of main" ] 38 set end_location [gdb_get_line_number "end of main" ]
39 gdb_test "break $end_location" \ 39 gdb_test "break $end_location" \
40 "Breakpoint $decimal at .*/$srcfile, line $end_location\." \ 40 "Breakpoint $decimal at .*/$srcfile, line $end_location\." \
41 "BP at end of main" 41 "BP at end of main"
42 42
43 gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main" 43 gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main"
44 44
45 gdb_test "record save consecutive.precsave" \ 45 gdb_test "record save $precsave" \
46 "Saved core file consecutive.precsave with execution log\." \ 46 "Saved core file $precsave with execution log\." \
47 "save process recfile" 47 "save process recfile"
48 48
49 gdb_test "kill" "" "Kill process, prepare to debug log file" \ 49 gdb_test "kill" "" "Kill process, prepare to debug log file" \
50 "Kill the program being debugged\\? \\(y or n\\) " "y" 50 "Kill the program being debugged\\? \\(y or n\\) " "y"
51 51
52 gdb_test "record restore consecutive.precsave" \ 52 gdb_test "record restore $precsave" \
53 "Program terminated with signal .*" \ 53 "Program terminated with signal .*" \
54 "reload precord save file" 54 "reload precord save file"
55 55
56 gdb_breakpoint foo 56 gdb_breakpoint foo
57 gdb_test "continue" "Breakpoint $decimal, foo .*" \ 57 gdb_test "continue" "Breakpoint $decimal, foo .*" \
58 "continue to breakpoint in foo" 58 "continue to breakpoint in foo"
59 59
60 set foo1_addr 0 60 set foo1_addr 0
61 set foo2_addr 0 61 set foo2_addr 0
62 set stop_addr 0 62 set stop_addr 0
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } else { 108 } else {
109 fail "$test_msg (wrong address)" 109 fail "$test_msg (wrong address)"
110 } 110 }
111 } 111 }
112 -re "Breakpoint $decimal, foo.*$gdb_prompt $" { 112 -re "Breakpoint $decimal, foo.*$gdb_prompt $" {
113 gdb_test "print \$pc == $foo1_addr" \ 113 gdb_test "print \$pc == $foo1_addr" \
114 "$decimal = 1" \ 114 "$decimal = 1" \
115 "$test_msg" 115 "$test_msg"
116 } 116 }
117 } 117 }
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.reverse/break-reverse.exp ('k') | gdb/testsuite/gdb.reverse/consecutive-reverse.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698