summaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-11-28 17:09:26 +0000
committerYao Qi <yao.qi@linaro.org>2016-11-28 17:09:26 +0000
commit7dc54575d91a2b41f6c3e838eec44a7017a24436 (patch)
tree5140ebb00b483d631739e03184a30d5ce672f564 /gdb/value.h
parentee40d8d45213caf0cfb63e603f0fd5a58532e751 (diff)
Adjust Value.location for lval_register
value.regnum and value.next_frame_id are only used for lval_register, so this patch moves them to union value.location. As a result, when we copy value, only copy location, don't need to copy regnum and next_frame_id. This patch also changes regnum's type to int as there is no space constraint, so update deprecated_value_regnum_hack return type too. gdb: 2016-11-28 Yao Qi <yao.qi@linaro.org> * valops.c (value_slice): Don't set frame id of slice. * value.c (struct value) <regnum, next_frame_id>: Move them to... (struct value) <location>: ... here. Update comments. (allocate_value_lazy): Don't set frame id and regnum. (deprecated_value_next_frame_id_hack): Adjust. (deprecated_value_regnum_hack): Adjust. (value_copy): Don't copy frame id and regnu. (value_primitive_field): Likewise. (value_from_component): Likewise. (deprecated_value_regnum_hack): Return int *. * value.h (deprecated_value_regnum_hack): Update declaration.
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 281b5a8c8a..f776323c4a 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -448,7 +448,7 @@ extern struct frame_id *deprecated_value_next_frame_id_hack (struct value *);
#define VALUE_FRAME_ID(val) (get_prev_frame_id_by_id (VALUE_NEXT_FRAME_ID (val)))
/* Register number if the value is from a register. */
-extern short *deprecated_value_regnum_hack (struct value *);
+extern int *deprecated_value_regnum_hack (struct value *);
#define VALUE_REGNUM(val) (*deprecated_value_regnum_hack (val))
/* Return value after lval_funcs->coerce_ref (after check_typedef). Return