struct value *parent = value_parent (val);
LONGEST offset = value_offset (val);
LONGEST num = unpack_bits_as_long (value_type (val),
- value_contents (parent) + offset,
+ (value_contents_for_printing (parent)
+ + offset),
value_bitpos (val),
value_bitsize (val));
int length = TYPE_LENGTH (type);
+ if (!value_bits_valid (val,
+ TARGET_CHAR_BIT * offset + value_bitpos (val),
+ value_bitsize (val)))
+ error (_("value has been optimized out"));
+
store_signed_integer (value_contents_raw (val), length, byte_order, num);
}
else if (VALUE_LVAL (val) == lval_memory)
{
case lval_memory:
case lval_register:
+ case lval_computed:
reinit_frame_cache ();
{
v = value_static_field (type, i);
if (v == 0)
- error (_("field %s is nonexistent or has been optimised out"),
+ error (_("field %s is nonexistent or has been optimized out"),
name);
}
else
struct value *result;
sym = cp_lookup_symbol_namespace (namespace_name, name,
- get_selected_block (0),
- VAR_DOMAIN);
+ get_selected_block (0), VAR_DOMAIN);
+
+ if (sym == NULL)
+ {
+ char *concatenated_name = alloca (strlen (namespace_name) + 2
+ + strlen (name) + 1);
+
+ sprintf (concatenated_name, "%s::%s", namespace_name, name);
+ sym = lookup_static_symbol_aux (concatenated_name, VAR_DOMAIN);
+ }
if (sym == NULL)
return NULL;