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

Side by Side Diff: gdb/testsuite/gdb.ada/operator_bp.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
« no previous file with comments | « gdb/testsuite/gdb.ada/null_record.exp ('k') | gdb/testsuite/gdb.ada/operator_bp/ops.adb » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2012 Free Software Foundation, Inc.
2 #
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
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
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/>.
15
16 load_lib "ada.exp"
17
18 if { [skip_ada_tests] } { return -1 }
19
20 set testdir "operator_bp"
21 set testfile "${testdir}/ops_test"
22 set srcfile ${srcdir}/${subdir}/${testfile}.adb
23 set binfile ${objdir}/${subdir}/${testfile}
24
25 file mkdir ${objdir}/${subdir}/${testdir}
26 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
27 return -1
28 }
29
30 clean_restart ${testfile}
31
32 # This test won't work properly if system debuginfo is installed.
33 gdb_test_no_output "set debug-file-directory"
34
35 set bp_location [gdb_get_line_number "BEGIN" ${testdir}/ops_test.adb]
36 runto "ops_test.adb:$bp_location"
37
38 # Set breakpoints for all operators, using just the operator name in quotes.
39
40 foreach op { "+" "-" } {
41 set op_re [string_to_regexp $op]
42 gdb_test "break \"$op\"" \
43 "Breakpoint $decimal at $hex: \"$op_re\"\. \\(2 locations\\)"
44 }
45
46 foreach op { "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" "abs" "not"} {
47 set op_re [string_to_regexp $op]
48 gdb_test "break \"$op\"" \
49 "Breakpoint $decimal at $hex: file .*ops.adb, line $decimal."
50 }
51
52 # Make sure we stop correctly in each operator function.
53
54 foreach op { "+" "-" "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" " xor" "&" "abs" "not"} {
55 set op_re [string_to_regexp $op]
56 gdb_test "continue" \
57 "Breakpoint $decimal, ops\\.\"$op_re\" .*"\
58 "continue to \"$op\""
59 }
60
61 # Perform the same test, but using the qualified name of the operator,
62 # instead of the just the operator name (as in 'break ops."+"').
63
64 clean_restart ${testfile}
65
66 runto "ops_test.adb:$bp_location"
67
68 # Set breakpoints for all operators, using just the operator name in quotes.
69
70 foreach op { "+" "-" } {
71 set op_re [string_to_regexp $op]
72 gdb_test "break ops.\"$op\"" \
73 "Breakpoint $decimal at $hex: ops\\.\"$op_re\"\. \\(2 locations\\)"
74 }
75
76 foreach op { "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" "abs" "not"} {
77 set op_re [string_to_regexp $op]
78 gdb_test "break ops.\"$op\"" \
79 "Breakpoint $decimal at $hex: file .*ops.adb, line $decimal."
80 }
81
82 # Make sure we stop correctly in each operator function.
83
84 foreach op { "+" "-" "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" " xor" "&" "abs" "not"} {
85 set op_re [string_to_regexp $op]
86 gdb_test "continue" \
87 "Breakpoint $decimal, ops\\.\"$op_re\" .*"\
88 "continue to ops.\"$op\""
89 }
90
91
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.ada/null_record.exp ('k') | gdb/testsuite/gdb.ada/operator_bp/ops.adb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698