gdb/testsuite/
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / exprs.exp
index ca17bd2391406f8ed74bc3fd27914de946ac78fa..fa3cdb449578313f7822e0e61980bfa2318226de 100644 (file)
@@ -1,5 +1,4 @@
-#   Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000,
-#   2001, 2003, 2007, 2008, 2009, 2010, 2011 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
 
 # This file was written by Rob Savoye. (rob@cygnus.com)
 
-if $tracelevel {
-    strace $tracelevel
-}
-
 #
 # test running programs
 #
@@ -32,8 +27,8 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
      return -1
 }
 
-if [get_compiler_info ${binfile}] {
-    return -1;
+if [get_compiler_info] {
+    return -1
 }
 
 gdb_exit
@@ -270,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.024856 seconds and 4 git commands to generate.