Print nonexisting/optimized out static fields gracefully.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cp / m-static.exp
index 9b0e642d50b4dab05fc6b2123cec34d70934a9cc..a5d388c804e45ee6fe556a90ee78af6fed9f3535 100644 (file)
@@ -169,7 +169,10 @@ if {[test_compiler_info {gcc-[0-3]-*}]
     # and DW_AT_MIPS_linkage_name = _ZN9gnu_obj_47nowhereE .
     setup_xfail *-*-*
 }
-gdb_test "print test4.nowhere" "field nowhere is nonexistent or has been optimized out" "static const int initialized nowhere"
+gdb_test "print test4.nowhere" "<optimized out>" "static const int initialized nowhere (print field)"
+
+# Same, but print the whole struct.
+gdb_test "print test4" "static nowhere = <optimized out>.*" "static const int initialized nowhere (whole struct)"
 
 # static const initialized in the class definition, PR gdb/11702.
 if { $non_dwarf } { setup_xfail *-*-* }
This page took 0.027944 seconds and 4 git commands to generate.