aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorgdb-2.5.3 <gdb@fsf.org>1988-06-13 01:00:00 +0100
committerPedro Alves <palves@redhat.com>2012-06-03 15:36:30 +0100
commit7c75bab3d3ef344a6a0b13b9ab59ecd5855aceb5 (patch)
tree4e50a84965c0e24ba6734d9717e007e68879c8e0 /gdb/value.h
parent6368691e88d78f0bb6a46b74d7ed86118ac84e8b (diff)
downloadfsf-binutils-gdb-7c75bab3d3ef344a6a0b13b9ab59ecd5855aceb5.zip
fsf-binutils-gdb-7c75bab3d3ef344a6a0b13b9ab59ecd5855aceb5.tar.gz
fsf-binutils-gdb-7c75bab3d3ef344a6a0b13b9ab59ecd5855aceb5.tar.bz2
gdb-2.5.3
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 0b21e38..985e01e 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -56,10 +56,14 @@ typedef struct value *value;
#define VALUE_REGNO(val) (val)->regno
/* If ARG is an array, convert it to a pointer.
- If ARG is an enum, convert it to an integer. */
+ If ARG is an enum, convert it to an integer.
+
+ References are dereferenced. */
#define COERCE_ARRAY(arg) \
-{ if (VALUE_REPEATED (arg) \
+{ if (TYPE_CODE (arg) == TYPE_CODE_REF) \
+ arg = value_ind (arg); \
+ if (VALUE_REPEATED (arg) \
|| TYPE_CODE (VALUE_TYPE (arg)) == TYPE_CODE_ARRAY) \
arg = value_coerce_array (arg); \
if (TYPE_CODE (VALUE_TYPE (arg)) == TYPE_CODE_ENUM) \
@@ -69,7 +73,9 @@ typedef struct value *value;
/* If ARG is an enum, convert it to an integer. */
#define COERCE_ENUM(arg) \
-{ if (TYPE_CODE (VALUE_TYPE (arg)) == TYPE_CODE_ENUM) \
+{ if (TYPE_CODE (arg) == TYPE_CODE_REF) \
+ arg = value_ind (arg); \
+ if (TYPE_CODE (VALUE_TYPE (arg)) == TYPE_CODE_ENUM) \
arg = value_cast (builtin_type_unsigned_int, arg); \
}
@@ -133,3 +139,7 @@ int value_zerop ();
/* C++ */
value value_of_this ();
value value_static_field ();
+value value_x_binop ();
+value value_x_unop ();
+int binop_must_be_user_defined ();
+int unop_must_be_user_defined ();