fixed optimzation for Atom
[platform/upstream/binutils.git] / gdb / cp-valprint.c
index 93b95b3..42010c2 100644 (file)
@@ -27,7 +27,6 @@
 #include "gdbcmd.h"
 #include "demangle.h"
 #include "annotate.h"
-#include <string.h>
 #include "c-lang.h"
 #include "target.h"
 #include "cp-abi.h"
@@ -35,7 +34,6 @@
 #include "cp-support.h"
 #include "language.h"
 #include "extension.h"
-#include "exceptions.h"
 #include "typeprint.h"
 
 /* Controls printing of vtbl's.  */
@@ -294,12 +292,6 @@ cp_print_value_fields (struct type *type, struct type *real_type,
                {
                  fputs_filtered (_("<synthetic pointer>"), stream);
                }
-             else if (!value_bits_valid (val,
-                                         TYPE_FIELD_BITPOS (type, i),
-                                         TYPE_FIELD_BITSIZE (type, i)))
-               {
-                 val_print_optimized_out (val, stream);
-               }
              else
                {
                  struct value_print_options opts = *options;
@@ -434,8 +426,9 @@ cp_print_value_fields_rtti (struct type *type,
 
   /* We require all bits to be valid in order to attempt a
      conversion.  */
-  if (value_bits_valid (val, TARGET_CHAR_BIT * offset,
-                       TARGET_CHAR_BIT * TYPE_LENGTH (type)))
+  if (!value_bits_any_optimized_out (val,
+                                    TARGET_CHAR_BIT * offset,
+                                    TARGET_CHAR_BIT * TYPE_LENGTH (type)))
     {
       struct value *value;
       int full, top, using_enc;