+2013-07-30 Andrew Burgess <aburgess@broadcom.com>
+
+ * value.c (value_fetch_lazy): Mark optimized out values as such
+ rather than raising an error.
+
2013-07-30 Andrew Burgess <aburgess@broadcom.com>
* value.c (value_fetch_lazy): Ensure parent value is not lazy
+2013-07-30 Andrew Burgess <aburgess@broadcom.com>
+
+ * gdb.dwarf2/pieces-optimized-out.exp: Expect "<optimized out>"
+ when printing an optimized out value. Expect an error when using
+ an optimized out value in an expression.
+
2013-07-30 Andrew Burgess <aburgess@broadcom.com>
* gdb.dwarf2/pieces-optimized-out.exp: New file.
"print s"
gdb_test "p s.a" " = 5" "print s.a"
gdb_test "p s.b" " = <optimized out>" "print s.b"
-gdb_test "p s.c" "value has been optimized out" "print s.c"
-gdb_test "p s.d" "value has been optimized out" "print s.d"
+gdb_test "p s.c" " = <optimized out>" "print s.c"
+gdb_test "p s.d" " = <optimized out>" "print s.d"
+gdb_test "p s.d + 1" "value has been optimized out" "print s.d + 1"
if (!value_bits_valid (parent,
TARGET_CHAR_BIT * offset + value_bitpos (val),
value_bitsize (val)))
- error (_("value has been optimized out"));
-
- if (!unpack_value_bits_as_long (value_type (val),
+ set_value_optimized_out (val, 1);
+ else if (!unpack_value_bits_as_long (value_type (val),
value_contents_for_printing (parent),
offset,
value_bitpos (val),