]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.cp/debug-expr.exp
gdb: fix debug expression dumping of function call expressions
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.cp / debug-expr.exp
index 79ba0bc377f1ff907fa0482db5eb6ecf9e148cb5..77462c5b3f24bbba680e9a8d811b8c965341a669 100644 (file)
@@ -21,23 +21,11 @@ gdb_start
 gdb_test_no_output "set language c++"
 gdb_test_no_output "set debug expression 1"
 
-# Test whether the expression debug machinery accepts the expression.
-
-proc test_debug_expr { cmd output } {
-    global gdb_prompt
-
-    gdb_test_multiple $cmd "" {
-       -re ".*Invalid expression.*\r\n$gdb_prompt $" {
-           fail $cmd
-       }
-       -re ".*\[\r\n\]$output\r\n$gdb_prompt $" {
-           pass $cmd
-       }
-    }
-}
-
 set void_star_zero_regex "\[$\]$decimal = \\(void \[*\]\\) 0x0"
 
-test_debug_expr "print static_cast<void*>(0)" "$void_star_zero_regex"
-test_debug_expr "print reinterpret_cast<void*>(0)" "$void_star_zero_regex"
-test_debug_expr "print dynamic_cast<void*>(0)" "$void_star_zero_regex"
+gdb_test_debug_expr "print static_cast<void*>(0)" \
+    "$void_star_zero_regex" "static_cast of zero to void*"
+gdb_test_debug_expr "print reinterpret_cast<void*>(0)" \
+    "$void_star_zero_regex" "reinterpret_cast of zero to void*"
+gdb_test_debug_expr "print dynamic_cast<void*>(0)" \
+    "$void_star_zero_regex" "dynamic_cast of zero to void*"