aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:13:46 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:13:46 +0000
commit89eef114606ca0510db54cec2fc60946a91990e8 (patch)
treece97504e52ddf8d7505920f03559f2428b431940 /gdb/value.h
parent98b90dd8884cb6526f17524e800a315860904ec0 (diff)
downloadgdb-89eef114606ca0510db54cec2fc60946a91990e8.zip
gdb-89eef114606ca0510db54cec2fc60946a91990e8.tar.gz
gdb-89eef114606ca0510db54cec2fc60946a91990e8.tar.bz2
* value.h (value_add, value_sub): Remove.
(value_ptradd, value_ptrsub, value_ptrdiff): Add prototypes. * valarith.c (value_add, value_sub): Remove. (value_ptradd, value_ptrsub, value_ptrdiff): New functions. (find_size_for_pointer_math): Add assertion. Update comment. (value_binop): Update comment. * eval.c (ptrmath_type_p): New function. (evaluate_subexp_standard): Replace value_add and value_sub by value_ptradd, value_ptrsub, value_ptrdiff or value_binop. Use builtin_type_uint8 instead of builtin_type_char to hold the increment for BINOP_{PRE,POST}{IN,DE}CREMENT operations. * valarith.c (value_subscript): Replace value_add by value_ptradd. Replace value_sub by value_binop. * ada-lang.c (ada_value_ptr_subscript): Likewise. (ada_tag_name_2): Replace value_add by value_ptradd. (ada_evaluate_subexp): Replace value_add and value_sub by value_binop. * m2-lang.c (evaluate_subexp_modula2): Replace value_add by value_ptradd. * gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise. * gnu-v3-abi.c (gnuv3_method_ptr_to_value): Likewise.
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/value.h b/gdb/value.h
index d0545e2..5ff84b3 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -331,9 +331,11 @@ extern struct value *value_concat (struct value *arg1, struct value *arg2);
extern struct value *value_binop (struct value *arg1, struct value *arg2,
enum exp_opcode op);
-extern struct value *value_add (struct value *arg1, struct value *arg2);
+extern struct value *value_ptradd (struct value *arg1, struct value *arg2);
-extern struct value *value_sub (struct value *arg1, struct value *arg2);
+extern struct value *value_ptrsub (struct value *arg1, struct value *arg2);
+
+extern LONGEST value_ptrdiff (struct value *arg1, struct value *arg2);
extern int value_must_coerce_to_target (struct value *arg1);