Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/gdb/gdb/values.c
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | allocate_value (struct type *type) | ||||
VALUE_BITSIZE (val) = 0; | VALUE_BITSIZE (val) = 0; | ||||
VALUE_REGNO (val) = -1; | VALUE_REGNO (val) = -1; | ||||
VALUE_LAZY (val) = 0; | VALUE_LAZY (val) = 0; | ||||
VALUE_OPTIMIZED_OUT (val) = 0; | VALUE_OPTIMIZED_OUT (val) = 0; | ||||
VALUE_BFD_SECTION (val) = NULL; | VALUE_BFD_SECTION (val) = NULL; | ||||
VALUE_EMBEDDED_OFFSET (val) = 0; | VALUE_EMBEDDED_OFFSET (val) = 0; | ||||
VALUE_POINTED_TO_OFFSET (val) = 0; | VALUE_POINTED_TO_OFFSET (val) = 0; | ||||
val->modifiable = 1; | val->modifiable = 1; | ||||
val->initialized = 1; /* Default to initialized. */ | |||||
return val; | return val; | ||||
} | } | ||||
/* Allocate a value that has the correct length | /* Allocate a value that has the correct length | ||||
for COUNT repetitions type TYPE. */ | for COUNT repetitions type TYPE. */ | ||||
struct value * | struct value * | ||||
allocate_repeat_value (struct type *type, int count) | allocate_repeat_value (struct type *type, int count) | ||||
▲ Show 20 Lines • Show All 1,192 Lines • ▼ Show 20 Lines | return USE_STRUCT_CONVENTION (gcc_p, value_type); | ||||
else | else | ||||
return 0; | return 0; | ||||
} | } | ||||
/* Probe the architecture for the return-value convention. */ | /* Probe the architecture for the return-value convention. */ | ||||
return (gdbarch_return_value (current_gdbarch, value_type, | return (gdbarch_return_value (current_gdbarch, value_type, | ||||
NULL, NULL, NULL) | NULL, NULL, NULL) | ||||
== RETURN_VALUE_STRUCT_CONVENTION); | == RETURN_VALUE_STRUCT_CONVENTION); | ||||
} | |||||
/* Set the initialized field in a value struct. */ | |||||
void | |||||
set_value_initialized (struct value *val, int status) | |||||
{ | |||||
val->initialized = status; | |||||
} | |||||
/* Return the initialized field in a value struct. */ | |||||
int | |||||
value_initialized (struct value *val) | |||||
{ | |||||
return val->initialized; | |||||
} | } | ||||
void | void | ||||
_initialize_values (void) | _initialize_values (void) | ||||
{ | { | ||||
add_cmd ("convenience", no_class, show_convenience, | add_cmd ("convenience", no_class, show_convenience, | ||||
"Debugger convenience (\"$foo\") variables.\n\ | "Debugger convenience (\"$foo\") variables.\n\ | ||||
These variables are created when you assign them values;\n\ | These variables are created when you assign them values;\n\ | ||||
Show All 10 Lines |