aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/exprs.exp
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-10-11 15:24:11 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-10-11 15:24:11 +0000
commit941b2081b1fd085fff7d323448672cedf18258db (patch)
tree9ce9ac187478148ba6cf153185277a57eef997f2 /gdb/testsuite/gdb.base/exprs.exp
parent3c4d7e1201c0e8fb4b9a3e4f297c5b4a18bf38db (diff)
downloadgdb-941b2081b1fd085fff7d323448672cedf18258db.zip
gdb-941b2081b1fd085fff7d323448672cedf18258db.tar.gz
gdb-941b2081b1fd085fff7d323448672cedf18258db.tar.bz2
gdb/
Revert this part of: 2011-10-09 Jan Kratochvil <jan.kratochvil@redhat.com> Support @entry in input expressions. * c-exp.y (ENTRY, unknown_cpp_name): New. (exp: UNKNOWN_CPP_NAME): Change to `exp: unknown_cpp_name'. (unknown_cpp_name: UNKNOWN_CPP_NAME, unknown_cpp_name: ENTRY) (variable: name_not_typename '@' ENTRY, name: ENTRY) (name_not_typename: ENTRY): New. (yylex): Recognize ENTRY. Reimplement @entry in input expressions. * c-exp.y (ENTRY): New. (variable: name_not_typename ENTRY): New. (lex_one_token): Optionally return ENTRY instead of the '@' lex. gdb/testsuite/ Reimplement @entry in input expressions. * gdb.base/exprs.c (v_int_array_init): New variable. * gdb.base/exprs.exp (print v_int_array_init) (print *v_int_array_init@1, print *v_int_array_init@2) (print v_int_array_init[0]@1, print v_int_array_init[0]@2) (print v_int_array_init[1]@1): New tests.
Diffstat (limited to 'gdb/testsuite/gdb.base/exprs.exp')
-rw-r--r--gdb/testsuite/gdb.base/exprs.exp8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp
index 8c9762f..ca17bd2 100644
--- a/gdb/testsuite/gdb.base/exprs.exp
+++ b/gdb/testsuite/gdb.base/exprs.exp
@@ -262,3 +262,11 @@ gdb_test "print v_int--" "\\$\[0-9\]* = 3"
gdb_test "print --v_int" "\\$\[0-9\]* = 1"
gdb_test "print v_int++ = 5" "Left operand of assignment is not an lvalue."
gdb_test "print v_int-- = 5" "Left operand of assignment is not an lvalue."
+
+# initialized array
+gdb_test {print v_int_array_init} { = \{10, 20\}}
+gdb_test {print *v_int_array_init@1} { = \{10\}}
+gdb_test {print *v_int_array_init@2} { = \{10, 20\}}
+gdb_test {print v_int_array_init[0]@1} { = \{10\}}
+gdb_test {print v_int_array_init[0]@2} { = \{10, 20\}}
+gdb_test {print v_int_array_init[1]@1} { = \{20\}}