mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-12 20:03:45 +08:00
Don't raise an error for optimized out sub-fields.
http://sourceware.org/ml/gdb-patches/2013-07/msg00317.html gdb/ChangeLog * value.c (value_fetch_lazy): Mark optimized out values as such rather than raising an error. gdb/testsuite/ChangeLog * 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.
This commit is contained in:
parent
b0c54aa509
commit
11b4b7cc1f
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
@ -44,6 +44,7 @@ gdb_test "p s" \
|
||||
"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"
|
||||
|
||||
|
@ -3439,9 +3439,8 @@ value_fetch_lazy (struct value *val)
|
||||
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),
|
||||
|
Loading…
Reference in New Issue
Block a user