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

Side by Side Diff: gdb/testsuite/gdb.reverse/machinestate-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
(...skipping 22 matching lines...) Expand all
33 # heap variable (pointer)... 33 # heap variable (pointer)...
34 # overlay variables... 34 # overlay variables...
35 # Test forward replay 35 # Test forward replay
36 # 36 #
37 37
38 # This test suitable only for process record-replay 38 # This test suitable only for process record-replay
39 if ![supports_process_record] { 39 if ![supports_process_record] {
40 return 40 return
41 } 41 }
42 42
43 set testfile "machinestate" 43 standard_testfile machinestate.c ms1.c
44 set srcfile ${testfile}.c 44 set precsave [standard_output_file machinestate.precsave]
45 set srcfile1 ms1.c
46 45
47 if { [prepare_for_testing $testfile.exp $testfile {machinestate.c ms1.c} ] } { 46 if { [prepare_for_testing $testfile.exp $testfile \
47 » [list $srcfile $srcfile2]] } {
48 return -1 48 return -1
49 } 49 }
50 50
51 set newline "\[\r\n\]+" 51 set newline "\[\r\n\]+"
52 52
53 set beginmain [gdb_get_line_number " begin main " $srcfile] 53 set beginmain [gdb_get_line_number " begin main " $srcfile]
54 set endmain [gdb_get_line_number " end main " $srcfile] 54 set endmain [gdb_get_line_number " end main " $srcfile]
55 55
56 # Test begins 56 # Test begins
57 57
58 runto main 58 runto main
59 59
60 if [supports_process_record] { 60 if [supports_process_record] {
61 # Activate process record/replay 61 # Activate process record/replay
62 gdb_test_no_output "record" "Turn on process record" 62 gdb_test_no_output "record" "Turn on process record"
63 } 63 }
64 64
65 gdb_test "break $endmain" \ 65 gdb_test "break $endmain" \
66 "Breakpoint $decimal at .*/$srcfile, line $endmain\." \ 66 "Breakpoint $decimal at .*/$srcfile, line $endmain\." \
67 "BP at end of main" 67 "BP at end of main"
68 68
69 gdb_test "continue" "Breakpoint .* end main .*" "run to end of main" 69 gdb_test "continue" "Breakpoint .* end main .*" "run to end of main"
70 70
71 gdb_test "record save machinestate.precsave" \ 71 gdb_test "record save $precsave" \
72 "Saved core file machinestate.precsave with execution log\." \ 72 "Saved core file $precsave with execution log\." \
73 "save process recfile" 73 "save process recfile"
74 74
75 gdb_test "kill" "" "Kill process, prepare to debug log file" \ 75 gdb_test "kill" "" "Kill process, prepare to debug log file" \
76 "Kill the program being debugged\\? \\(y or n\\) " "y" 76 "Kill the program being debugged\\? \\(y or n\\) " "y"
77 77
78 gdb_test "record restore machinestate.precsave" \ 78 gdb_test "record restore $precsave" \
79 "Program terminated with signal .*" \ 79 "Program terminated with signal .*" \
80 "reload prec save file" 80 "reload prec save file"
81 81
82 # Proceed to end of main 82 # Proceed to end of main
83 83
84 gdb_test "break $endmain" \ 84 gdb_test "break $endmain" \
85 "Breakpoint.* file .*/$srcfile, line $endmain.*" "" 85 "Breakpoint.* file .*/$srcfile, line $endmain.*" ""
86 86
87 gdb_test_multiple "continue" "go to end of main forward" { 87 gdb_test_multiple "continue" "go to end of main forward" {
88 -re ".*Breakpoint $decimal,.*/$srcfile:$endmain.*$gdb_prompt $" { 88 -re ".*Breakpoint $decimal,.*/$srcfile:$endmain.*$gdb_prompt $" {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" "" 246 gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
247 gdb_test "continue" ".*/$srcfile:$breakloc.*" "forward to $breakloc" 247 gdb_test "continue" ".*/$srcfile:$breakloc.*" "forward to $breakloc"
248 248
249 gdb_test "print aglobal" ".* = 0$newline" "module global forward-breakpoint" 249 gdb_test "print aglobal" ".* = 0$newline" "module global forward-breakpoint"
250 gdb_test "reverse-step" ".*hide.*" "" 250 gdb_test "reverse-step" ".*hide.*" ""
251 gdb_test "step" ".*$newline$breakloc.*" "" 251 gdb_test "step" ".*$newline$breakloc.*" ""
252 gdb_test "print aglobal" ".* = 0$newline" "module global forward step-to" 252 gdb_test "print aglobal" ".* = 0$newline" "module global forward step-to"
253 gdb_test "step" ".* module global post-change .*" "" 253 gdb_test "step" ".* module global post-change .*" ""
254 gdb_test "print aglobal" ".* = 1$newline" "module global step post-change" 254 gdb_test "print aglobal" ".* = 1$newline" "module global step post-change"
255 255
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.reverse/machinestate.exp ('k') | gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698