diff options
author | Hui Zhu <teawater@gmail.com> | 2010-06-24 06:12:15 +0000 |
---|---|---|
committer | Hui Zhu <teawater@gmail.com> | 2010-06-24 06:12:15 +0000 |
commit | f1421989e756090c82431b85a3766b892361182e (patch) | |
tree | d0116061cc89ff965e6f8fb3bd6a48acc99614a2 /gdb/testsuite | |
parent | fee37fbc3aba9d2d623f8bf310f42d335adc0fda (diff) | |
download | gdb-f1421989e756090c82431b85a3766b892361182e.zip gdb-f1421989e756090c82431b85a3766b892361182e.tar.gz gdb-f1421989e756090c82431b85a3766b892361182e.tar.bz2 |
Add command "eval".
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/eval.exp | 22 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2d82d69..3808ba5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2010-06-24 Hui Zhu <teawater@gmail.com> + + * gdb.base/eval.exp: New file. + 2010-06-23 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> * gdb.cell/fork.exp: New file. diff --git a/gdb/testsuite/gdb.base/eval.exp b/gdb/testsuite/gdb.base/eval.exp new file mode 100644 index 0000000..9f335dd --- /dev/null +++ b/gdb/testsuite/gdb.base/eval.exp @@ -0,0 +1,22 @@ +# Copyright 2010 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +gdb_exit +gdb_start + +gdb_test_no_output "set \$a = 10" "Initialize \$a." + +gdb_test "eval \"echo %d\\n\", \$a++" "10" "First eval." +gdb_test "eval \"echo %d\\n\", \$a*2" "22" "Second eval." |