summaryrefslogtreecommitdiffstats
path: root/gdb/eval.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-02 00:20:07 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-02 00:20:07 +0000
commit990a07abf64d4a77851368ad9fafebb51ef25136 (patch)
tree8d021aa2eaa9ec89014b91f49ced5800d7d2878b /gdb/eval.c
parentf08562818b089d1f3d69fd30a15e3596aef04c01 (diff)
downloadppe42-binutils-990a07abf64d4a77851368ad9fafebb51ef25136.tar.gz
ppe42-binutils-990a07abf64d4a77851368ad9fafebb51ef25136.zip
2005-02-01 Andrew Cagney <cagney@gnu.org>
* value.c (value_contents_all_raw) (value_contents_raw): New functions. * value.h (VALUE_CONTENTS_ALL_RAW, VALUE_CONTENTS_RAW): Delete. (value_contents_raw, value_contents_all_raw): Declare functions. (VALUE_CONTENTS, VALUE_CONTENTS_ALL): Update. * std-regs.c, valarith.c, valops.c, eval.c: Update. * tracepoint.c, findvar.c: Update.
Diffstat (limited to 'gdb/eval.c')
-rw-r--r--gdb/eval.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/eval.c b/gdb/eval.c
index 7e0e9edbf9..592a9b2d14 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1,8 +1,8 @@
/* Evaluate expressions for GDB.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
- Foundation, Inc.
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 Free
+ Software Foundation, Inc.
This file is part of GDB.
@@ -360,7 +360,7 @@ init_array_element (struct value *array, struct value *element,
error ("tuple range index out of range");
for (index = low; index <= high; index++)
{
- memcpy (VALUE_CONTENTS_RAW (array)
+ memcpy (value_contents_raw (array)
+ (index - low_bound) * element_size,
VALUE_CONTENTS (element), element_size);
}
@@ -370,7 +370,7 @@ init_array_element (struct value *array, struct value *element,
index = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
if (index < low_bound || index > high_bound)
error ("tuple index out of range");
- memcpy (VALUE_CONTENTS_RAW (array) + (index - low_bound) * element_size,
+ memcpy (value_contents_raw (array) + (index - low_bound) * element_size,
VALUE_CONTENTS (element), element_size);
}
return index;
@@ -500,7 +500,7 @@ evaluate_subexp_standard (struct type *expect_type,
&& TYPE_CODE (type) == TYPE_CODE_STRUCT)
{
struct value *rec = allocate_value (expect_type);
- memset (VALUE_CONTENTS_RAW (rec), '\0', TYPE_LENGTH (type));
+ memset (value_contents_raw (rec), '\0', TYPE_LENGTH (type));
return evaluate_struct_tuple (rec, exp, pos, noside, nargs);
}
@@ -518,7 +518,7 @@ evaluate_subexp_standard (struct type *expect_type,
high_bound = (TYPE_LENGTH (type) / element_size) - 1;
}
index = low_bound;
- memset (VALUE_CONTENTS_RAW (array), 0, TYPE_LENGTH (expect_type));
+ memset (value_contents_raw (array), 0, TYPE_LENGTH (expect_type));
for (tem = nargs; --nargs >= 0;)
{
struct value *element;
@@ -544,7 +544,7 @@ evaluate_subexp_standard (struct type *expect_type,
if (index > high_bound)
/* to avoid memory corruption */
error ("Too many array elements");
- memcpy (VALUE_CONTENTS_RAW (array)
+ memcpy (value_contents_raw (array)
+ (index - low_bound) * element_size,
VALUE_CONTENTS (element),
element_size);
@@ -558,7 +558,7 @@ evaluate_subexp_standard (struct type *expect_type,
&& TYPE_CODE (type) == TYPE_CODE_SET)
{
struct value *set = allocate_value (expect_type);
- char *valaddr = VALUE_CONTENTS_RAW (set);
+ char *valaddr = value_contents_raw (set);
struct type *element_type = TYPE_INDEX_TYPE (type);
struct type *check_type = element_type;
LONGEST low_bound, high_bound;
OpenPOWER on IntegriCloud