From: Andrew Burgess Date: Tue, 9 Jul 2013 14:11:53 +0000 (+0000) Subject: Revert recent changes to value_bits_valid. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=466c1fcab760e27b5a335e2fc99001809d03a05f;p=binutils-gdb.git Revert recent changes to value_bits_valid. http://sourceware.org/ml/gdb-patches/2013-07/msg00243.html * value.c (value_bits_valid): Revert previous change, and change by Pedro on 2013-07-04, due to regressions in gdb.dwarf2/implptr.exp and gdb.dwarf2/pieces.exp. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fad36f45517..f31edc51f5a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2013-07-09 Andrew Burgess + + * value.c (value_bits_valid): Revert previous change, and change + by Pedro on 2013-07-04, due to regressions in + gdb.dwarf2/implptr.exp and gdb.dwarf2/pieces.exp. + 2013-07-08 Andrew Burgess Pedro Alves diff --git a/gdb/value.c b/gdb/value.c index 1be18456574..ce4b13a17a2 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -1082,12 +1082,13 @@ value_entirely_optimized_out (const struct value *value) int value_bits_valid (const struct value *value, int offset, int length) { + if (!value->optimized_out) + return 1; if (value->lval != lval_computed || !value->location.computed.funcs->check_validity) - return !value->optimized_out; - else - return value->location.computed.funcs->check_validity (value, offset, - length); + return 0; + return value->location.computed.funcs->check_validity (value, offset, + length); } int