Lines Matching refs:val
83 struct value *val; in allocate_value() local
86 val = (struct value *) xmalloc (sizeof (struct value) + TYPE_LENGTH (atype)); in allocate_value()
87 VALUE_NEXT (val) = all_values; in allocate_value()
88 all_values = val; in allocate_value()
89 VALUE_TYPE (val) = type; in allocate_value()
90 VALUE_ENCLOSING_TYPE (val) = type; in allocate_value()
91 VALUE_LVAL (val) = not_lval; in allocate_value()
92 VALUE_ADDRESS (val) = 0; in allocate_value()
93 VALUE_FRAME_ID (val) = null_frame_id; in allocate_value()
94 VALUE_OFFSET (val) = 0; in allocate_value()
95 VALUE_BITPOS (val) = 0; in allocate_value()
96 VALUE_BITSIZE (val) = 0; in allocate_value()
97 VALUE_REGNO (val) = -1; in allocate_value()
98 VALUE_LAZY (val) = 0; in allocate_value()
99 VALUE_OPTIMIZED_OUT (val) = 0; in allocate_value()
100 VALUE_BFD_SECTION (val) = NULL; in allocate_value()
101 VALUE_EMBEDDED_OFFSET (val) = 0; in allocate_value()
102 VALUE_POINTED_TO_OFFSET (val) = 0; in allocate_value()
103 val->modifiable = 1; in allocate_value()
104 return val; in allocate_value()
139 struct value *val; in value_free_to_mark() local
142 for (val = all_values; val && val != mark; val = next) in value_free_to_mark()
144 next = VALUE_NEXT (val); in value_free_to_mark()
145 value_free (val); in value_free_to_mark()
147 all_values = val; in value_free_to_mark()
156 struct value *val; in free_all_values() local
159 for (val = all_values; val; val = next) in free_all_values()
161 next = VALUE_NEXT (val); in free_all_values()
162 value_free (val); in free_all_values()
172 release_value (struct value *val) in release_value() argument
176 if (all_values == val) in release_value()
178 all_values = val->next; in release_value()
184 if (v->next == val) in release_value()
186 v->next = val->next; in release_value()
196 struct value *val; in value_release_to_mark() local
199 for (val = next = all_values; next; next = VALUE_NEXT (next)) in value_release_to_mark()
204 return val; in value_release_to_mark()
207 return val; in value_release_to_mark()
218 struct value *val = allocate_value (encl_type); in value_copy() local
219 VALUE_TYPE (val) = VALUE_TYPE (arg); in value_copy()
220 VALUE_LVAL (val) = VALUE_LVAL (arg); in value_copy()
221 VALUE_ADDRESS (val) = VALUE_ADDRESS (arg); in value_copy()
222 VALUE_OFFSET (val) = VALUE_OFFSET (arg); in value_copy()
223 VALUE_BITPOS (val) = VALUE_BITPOS (arg); in value_copy()
224 VALUE_BITSIZE (val) = VALUE_BITSIZE (arg); in value_copy()
225 VALUE_FRAME_ID (val) = VALUE_FRAME_ID (arg); in value_copy()
226 VALUE_REGNO (val) = VALUE_REGNO (arg); in value_copy()
227 VALUE_LAZY (val) = VALUE_LAZY (arg); in value_copy()
228 VALUE_OPTIMIZED_OUT (val) = VALUE_OPTIMIZED_OUT (arg); in value_copy()
229 VALUE_EMBEDDED_OFFSET (val) = VALUE_EMBEDDED_OFFSET (arg); in value_copy()
230 VALUE_POINTED_TO_OFFSET (val) = VALUE_POINTED_TO_OFFSET (arg); in value_copy()
231 VALUE_BFD_SECTION (val) = VALUE_BFD_SECTION (arg); in value_copy()
232 val->modifiable = arg->modifiable; in value_copy()
233 if (!VALUE_LAZY (val)) in value_copy()
235 memcpy (VALUE_CONTENTS_ALL_RAW (val), VALUE_CONTENTS_ALL_RAW (arg), in value_copy()
239 return val; in value_copy()
250 record_latest_value (struct value *val) in record_latest_value() argument
258 if (VALUE_LAZY (val)) in record_latest_value()
259 value_fetch_lazy (val); in record_latest_value()
263 val->modifiable = 0; in record_latest_value()
264 release_value (val); in record_latest_value()
280 value_history_chain->values[i] = val; in record_latest_value()
333 struct value *val; in clear_value_history() local
338 if ((val = value_history_chain->values[i]) != NULL) in clear_value_history()
339 xfree (val); in clear_value_history()
351 struct value *val; in show_values() local
372 val = access_value_history (i); in show_values()
374 value_print (val, gdb_stdout, 0, Val_pretty_default); in show_values()
425 struct value *val; in value_of_internalvar() local
427 val = value_copy (var->value); in value_of_internalvar()
428 if (VALUE_LAZY (val)) in value_of_internalvar()
429 value_fetch_lazy (val); in value_of_internalvar()
430 VALUE_LVAL (val) = lval_internalvar; in value_of_internalvar()
431 VALUE_INTERNALVAR (val) = var; in value_of_internalvar()
432 return val; in value_of_internalvar()
449 set_internalvar (struct internalvar *var, struct value *val) in set_internalvar() argument
453 newval = value_copy (val); in set_internalvar()
526 value_as_long (struct value *val) in value_as_long() argument
531 COERCE_ARRAY (val); in value_as_long()
532 return unpack_long (VALUE_TYPE (val), VALUE_CONTENTS (val)); in value_as_long()
536 value_as_double (struct value *val) in value_as_double() argument
541 foo = unpack_double (VALUE_TYPE (val), VALUE_CONTENTS (val), &inv); in value_as_double()
550 value_as_address (struct value *val) in value_as_address() argument
558 return ADDR_BITS_REMOVE (value_as_long (val)); in value_as_address()
598 if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_FUNC in value_as_address()
599 || TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_METHOD) in value_as_address()
600 return VALUE_ADDRESS (val); in value_as_address()
602 COERCE_ARRAY (val); in value_as_address()
641 if (TYPE_CODE (VALUE_TYPE (val)) != TYPE_CODE_PTR in value_as_address()
642 && TYPE_CODE (VALUE_TYPE (val)) != TYPE_CODE_REF in value_as_address()
644 return INTEGER_TO_ADDRESS (VALUE_TYPE (val), VALUE_CONTENTS (val)); in value_as_address()
646 return unpack_long (VALUE_TYPE (val), VALUE_CONTENTS (val)); in value_as_address()
842 value_change_enclosing_type (struct value *val, struct type *new_encl_type) in value_change_enclosing_type() argument
844 if (TYPE_LENGTH (new_encl_type) <= TYPE_LENGTH (VALUE_ENCLOSING_TYPE (val))) in value_change_enclosing_type()
846 VALUE_ENCLOSING_TYPE (val) = new_encl_type; in value_change_enclosing_type()
847 return val; in value_change_enclosing_type()
854 … new_val = (struct value *) xrealloc (val, sizeof (struct value) + TYPE_LENGTH (new_encl_type)); in value_change_enclosing_type()
863 if (val != all_values) in value_change_enclosing_type()
867 if (prev->next == val) in value_change_enclosing_type()
1033 ULONGEST val; in unpack_field_as_long() local
1040 val = extract_unsigned_integer (valaddr + bitpos / 8, sizeof (val)); in unpack_field_as_long()
1047 lsbcount = (sizeof val * 8 - bitpos % 8 - bitsize); in unpack_field_as_long()
1050 val >>= lsbcount; in unpack_field_as_long()
1055 if ((bitsize > 0) && (bitsize < 8 * (int) sizeof (val))) in unpack_field_as_long()
1058 val &= valmask; in unpack_field_as_long()
1061 if (val & (valmask ^ (valmask >> 1))) in unpack_field_as_long()
1063 val |= ~valmask; in unpack_field_as_long()
1067 return (val); in unpack_field_as_long()
1119 struct value *val = allocate_value (type); in value_from_longest() local
1136 store_signed_integer (VALUE_CONTENTS_RAW (val), len, num); in value_from_longest()
1141 store_typed_address (VALUE_CONTENTS_RAW (val), type, (CORE_ADDR) num); in value_from_longest()
1147 return val; in value_from_longest()
1156 struct value *val = allocate_value (type); in value_from_pointer() local
1157 store_typed_address (VALUE_CONTENTS_RAW (val), type, addr); in value_from_pointer()
1158 return val; in value_from_pointer()
1170 struct value *val; in value_from_string() local
1185 val = allocate_value (stringtype); in value_from_string()
1186 memcpy (VALUE_CONTENTS_RAW (val), ptr, len); in value_from_string()
1187 return val; in value_from_string()
1193 struct value *val = allocate_value (type); in value_from_double() local
1200 store_typed_floating (VALUE_CONTENTS_RAW (val), base_type, num); in value_from_double()
1205 return val; in value_from_double()