OLD | NEW |
1 # Copyright (C) 2011-2012 Free Software Foundation, Inc. | 1 # Copyright (C) 2011-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 mi-support.exp | 16 load_lib mi-support.exp |
17 set MIFLAGS "-i=mi2" | 17 set MIFLAGS "-i=mi2" |
18 | 18 |
19 gdb_exit | 19 gdb_exit |
20 if [mi_gdb_start] { | 20 if [mi_gdb_start] { |
21 continue | 21 continue |
22 } | 22 } |
23 | 23 |
24 set testfile mi2-amd64-entry-value | 24 standard_testfile .s |
25 set srcfile ${testfile}.s | |
26 set opts {} | 25 set opts {} |
27 | 26 |
28 if [info exists COMPILE] { | 27 if [info exists COMPILE] { |
29 # make check RUNTESTFLAGS="gdb.mi/mi2-amd64-entry-value.exp COMPILE=1" | 28 # make check RUNTESTFLAGS="gdb.mi/mi2-amd64-entry-value.exp COMPILE=1" |
30 set srcfile ${testfile}.c | 29 set srcfile ${testfile}.c |
31 lappend opts debug optimize=-O2 | 30 lappend opts debug optimize=-O2 |
32 } elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } { | 31 } elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } { |
33 verbose "Skipping mi2-amd64-entry-value." | 32 verbose "Skipping mi2-amd64-entry-value." |
34 return | 33 return |
35 } | 34 } |
36 | 35 |
37 set executable ${testfile} | 36 set executable ${testfile} |
38 set binfile ${objdir}/${subdir}/${executable} | |
39 | 37 |
40 if [build_executable ${testfile}.exp ${executable} ${srcfile} $opts] { | 38 if [build_executable ${testfile}.exp ${executable} ${srcfile} $opts] { |
41 return -1 | 39 return -1 |
42 } | 40 } |
43 | 41 |
44 mi_gdb_reinitialize_dir $srcdir/$subdir | 42 mi_gdb_reinitialize_dir $srcdir/$subdir |
45 mi_gdb_load ${binfile} | 43 mi_gdb_load ${binfile} |
46 | 44 |
47 foreach name {different breakhere_different breakhere_validity breakhere_invalid
} { | 45 foreach name {different breakhere_different breakhere_validity breakhere_invalid
} { |
48 mi_create_breakpoint $name .* .* .* .* .* .* "break $name" | 46 mi_create_breakpoint $name .* .* .* .* .* .* "break $name" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val"
,arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "default: entry_equa
l: -stack-list-variables" | 160 mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val"
,arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "default: entry_equa
l: -stack-list-variables" |
163 mi_send_resuming_command "exec-continue" "default: entry_different: continue" | 161 mi_send_resuming_command "exec-continue" "default: entry_different: continue" |
164 mi_expect_stop "breakpoint-hit" .* {{name="val",value="6"},{name="val@entry",val
ue="5"}} .* .* {.* disp="keep"} "default: entry_different: stop" | 162 mi_expect_stop "breakpoint-hit" .* {{name="val",value="6"},{name="val@entry",val
ue="5"}} .* .* {.* disp="keep"} "default: entry_different: stop" |
165 mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val"
,arg="1",value="6"},{name="val@entry",arg="1",value="5"}\]} "default: entry_diff
erent: -stack-list-variables" | 163 mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val"
,arg="1",value="6"},{name="val@entry",arg="1",value="5"}\]} "default: entry_diff
erent: -stack-list-variables" |
166 mi_send_resuming_command "exec-continue" "default: validity: continue" | 164 mi_send_resuming_command "exec-continue" "default: validity: continue" |
167 mi_expect_stop "breakpoint-hit" .* {{name="lost",value="<optimized out>"},{name=
"lost@entry",value="5"},{name="born",value="10"}} .* .* {.* disp="keep"} "defaul
t: validity: stop" | 165 mi_expect_stop "breakpoint-hit" .* {{name="lost",value="<optimized out>"},{name=
"lost@entry",value="5"},{name="born",value="10"}} .* .* {.* disp="keep"} "defaul
t: validity: stop" |
168 mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost
",arg="1",value="<optimized out>"},{name="lost@entry",arg="1",value="5"},{name="
born",arg="1",value="10"}\]} "default: validity: -stack-list-variables" | 166 mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="lost
",arg="1",value="<optimized out>"},{name="lost@entry",arg="1",value="5"},{name="
born",arg="1",value="10"}\]} "default: validity: -stack-list-variables" |
169 mi_send_resuming_command "exec-continue" "default: invalid: continue" | 167 mi_send_resuming_command "exec-continue" "default: invalid: continue" |
170 mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .*
{.* disp="keep"} "default: invalid: stop" | 168 mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .*
{.* disp="keep"} "default: invalid: stop" |
171 mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv"
,arg="1",value="<optimized out>"}\]} "default: invalid: -stack-list-variables" | 169 mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv"
,arg="1",value="<optimized out>"}\]} "default: invalid: -stack-list-variables" |
OLD | NEW |