aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-01-13 10:34:31 +0000
committerPedro Alves <palves@redhat.com>2009-01-13 10:34:31 +0000
commit74bcbdf3cea56564d1f9f597c8458b86ed71f621 (patch)
tree1ab2d8991bf751064e627c0f1cd8ba18a63357e2 /gdb/value.h
parentd7dc3873fbc2c722d5ee850341be49028dc5c6b0 (diff)
downloadgdb-74bcbdf3cea56564d1f9f597c8458b86ed71f621.zip
gdb-74bcbdf3cea56564d1f9f597c8458b86ed71f621.tar.gz
gdb-74bcbdf3cea56564d1f9f597c8458b86ed71f621.tar.bz2
2009-01-13 Jim Blandy <jimb@codesourcery.com>
Abstract out common code for copying value locations. * value.h (set_value_component_location): New declaration. * value.c (set_value_component_location): New function. (value_primitive_field): Use it. * valarith.c (value_subscript, value_subscripted_rvalue): Same. * valops.c (search_struct_field, value_slice): Same. * ada-lang.c (coerce_unspec_val_to_type) (ada_value_primitive_packed_val): Same.
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 4c28aa2..ecdcf25 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -205,6 +205,11 @@ extern void set_value_optimized_out (struct value *value, int val);
extern int value_initialized (struct value *);
extern void set_value_initialized (struct value *, int);
+/* Set COMPONENT's location as appropriate for a component of WHOLE
+ --- regardless of what kind of lvalue WHOLE is. */
+extern void set_value_component_location (struct value *component,
+ struct value *whole);
+
/* While the following fields are per- VALUE .CONTENT .PIECE (i.e., a
single value might have multiple LVALs), this hacked interface is
limited to just the first PIECE. Expect further change. */