gdb/testsuite/
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / exprs.exp
index 9599028bac7f29c3df7faaffbbaf423ebed6e7eb..fa3cdb449578313f7822e0e61980bfa2318226de 100644 (file)
@@ -1,5 +1,4 @@
-#   Copyright 1988, 1990-1992, 1994-1998, 2000-2001, 2003, 2007-2012
-#   Free Software Foundation, Inc.
+#   Copyright 1988-2013 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
@@ -29,7 +28,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
 }
 
 if [get_compiler_info] {
-    return -1;
+    return -1
 }
 
 gdb_exit
@@ -266,3 +265,11 @@ 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\}}
+
+# gdb's {} extension
+gdb_test_no_output "set variable v_short_array\[0\] = 42"
+gdb_test "print {short} v_short_array" "$decimal = 42"
+
+# Regression tests for cast to void.
+gdb_test "print (void) v_int_pointer" " = void"
+gdb_test "print & (void) v_char" "value not located in memory."
This page took 0.023902 seconds and 4 git commands to generate.