OLD | NEW |
1 # Copyright 1999-2002, 2004, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 1999-2002, 2004, 2007-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 12 matching lines...) Expand all Loading... |
23 # | 23 # |
24 | 24 |
25 load_lib mi-support.exp | 25 load_lib mi-support.exp |
26 set MIFLAGS "-i=mi" | 26 set MIFLAGS "-i=mi" |
27 | 27 |
28 gdb_exit | 28 gdb_exit |
29 if [mi_gdb_start] { | 29 if [mi_gdb_start] { |
30 continue | 30 continue |
31 } | 31 } |
32 | 32 |
33 set testfile "basics" | 33 standard_testfile basics.c |
34 set srcfile ${testfile}.c | 34 |
35 set binfile ${objdir}/${subdir}/mi-eval | 35 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
36 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug additional_flags=-DFAKEARGV}] != "" } { | |
37 untested mi-eval.exp | 36 untested mi-eval.exp |
38 return -1 | 37 return -1 |
39 } | 38 } |
40 | 39 |
41 mi_delete_breakpoints | 40 mi_delete_breakpoints |
42 mi_gdb_reinitialize_dir $srcdir/$subdir | 41 mi_gdb_reinitialize_dir $srcdir/$subdir |
43 mi_gdb_reinitialize_dir $srcdir/$subdir | 42 mi_gdb_reinitialize_dir $srcdir/$subdir |
44 mi_gdb_load ${binfile} | 43 mi_gdb_load ${binfile} |
45 | 44 |
46 set line_callee4_head [gdb_get_line_number "callee4 ("] | 45 set line_callee4_head [gdb_get_line_number "callee4 ("] |
47 set line_callee4_body [expr $line_callee4_head + 2] | 46 set line_callee4_body [expr $line_callee4_head + 2] |
48 | 47 |
49 mi_runto callee4 | 48 mi_runto callee4 |
50 mi_next_to "callee4" "" "basics.c" [expr $line_callee4_body + 1] "next at callee
4" | 49 mi_next_to "callee4" "" "basics.c" [expr $line_callee4_body + 1] "next at callee
4" |
51 | 50 |
52 mi_gdb_test "211-data-evaluate-expression A" "211\\^done,value=\"1\"" "eval A" | 51 mi_gdb_test "211-data-evaluate-expression A" "211\\^done,value=\"1\"" "eval A" |
53 | 52 |
54 mi_gdb_test "311-data-evaluate-expression &A" "311\\^done,value=\"$hex\"" "eval
&A" | 53 mi_gdb_test "311-data-evaluate-expression &A" "311\\^done,value=\"$hex\"" "eval
&A" |
55 | 54 |
56 mi_gdb_test "411-data-evaluate-expression A+3" "411\\^done,value=\"4\"" "eval A+
3" | 55 mi_gdb_test "411-data-evaluate-expression A+3" "411\\^done,value=\"4\"" "eval A+
3" |
57 | 56 |
58 mi_gdb_test "511-data-evaluate-expression \"A + 3\"" "511\\^done,value=\"4\"" "e
val A + 3" | 57 mi_gdb_test "511-data-evaluate-expression \"A + 3\"" "511\\^done,value=\"4\"" "e
val A + 3" |
59 | 58 |
60 | 59 |
61 mi_gdb_exit | 60 mi_gdb_exit |
62 return 0 | 61 return 0 |
OLD | NEW |