aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-07 21:42:36 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-07 21:42:36 +0000
commit13bb5560e268fc77450c7e689f4b46e4dfbc9225 (patch)
tree63dc52008fe86ee08f928c118279826adb17e3f5 /gdb/value.h
parentb44d461b0ebcb9f30595e5c3e4c748775349ecf1 (diff)
downloadgdb-13bb5560e268fc77450c7e689f4b46e4dfbc9225.zip
gdb-13bb5560e268fc77450c7e689f4b46e4dfbc9225.tar.gz
gdb-13bb5560e268fc77450c7e689f4b46e4dfbc9225.tar.bz2
2005-02-07 Andrew Cagney <cagney@gnu.org>
* value.h (deprecated_value_lval_hack) (deprecated_value_address_hack) (deprecated_value_internalvar_hack_hack) (deprecated_value_regnum_hack): Declare. (VALUE_LVAL, VALUE_ADDRESS, VALUE_INTERNALVAR) (VALUE_FRAME_ID, VALUE_REGNUM): Use. * value.c (deprecated_value_lval_hack) (deprecated_value_address_hack) (deprecated_value_internalvar_hack_hack) (deprecated_value_regnum_hack): Define.
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/gdb/value.h b/gdb/value.h
index d894252..3905b1a 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -208,11 +208,6 @@ extern const bfd_byte *value_contents_all (struct value *);
extern int value_fetch_lazy (struct value *val);
-#define VALUE_LVAL(val) (val)->lval
-#define VALUE_ADDRESS(val) (val)->location.address
-#define VALUE_INTERNALVAR(val) (val)->location.internalvar
-#define VALUE_FRAME_ID(val) ((val)->frame_id)
-#define VALUE_REGNUM(val) (val)->regnum
extern int value_optimized_out (struct value *value);
extern void set_value_optimized_out (struct value *value, int val);
extern int value_embedded_offset (struct value *value);
@@ -220,6 +215,20 @@ extern void set_value_embedded_offset (struct value *value, int val);
extern int value_pointed_to_offset (struct value *value);
extern void set_value_pointed_to_offset (struct value *value, int val);
+/* 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. */
+extern enum lval_type *deprecated_value_lval_hack (struct value *);
+#define VALUE_LVAL(val) (*deprecated_value_lval_hack (val))
+extern CORE_ADDR *deprecated_value_address_hack (struct value *);
+#define VALUE_ADDRESS(val) (*deprecated_value_address_hack (val))
+extern struct internalvar **deprecated_value_internalvar_hack (struct value *);
+#define VALUE_INTERNALVAR(val) (*deprecated_value_internalvar_hack (val))
+extern struct frame_id *deprecated_value_frame_id_hack (struct value *);
+#define VALUE_FRAME_ID(val) (*deprecated_value_frame_id_hack (val))
+extern short *deprecated_value_regnum_hack (struct value *);
+#define VALUE_REGNUM(val) (*deprecated_value_regnum_hack (val))
+
/* Convert a REF to the object referenced. */
extern struct value *coerce_ref (struct value *value);