diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-02-07 00:09:56 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-02-07 00:09:56 +0000 |
commit | 0fd88904d91d1a137779cd5da6dc9d223fa88d14 (patch) | |
tree | 34dfdde621bdd7cfcdbb59c69d53a749c7d48d8f /gdb/eval.c | |
parent | 1b3a857543e77eedd244b0d7d8cadce4e2e0500e (diff) | |
download | gdb-0fd88904d91d1a137779cd5da6dc9d223fa88d14.zip gdb-0fd88904d91d1a137779cd5da6dc9d223fa88d14.tar.gz gdb-0fd88904d91d1a137779cd5da6dc9d223fa88d14.tar.bz2 |
2005-02-06 Andrew Cagney <cagney@gnu.org>
* value.c (value_contents, value_contents_writeable): New
functions.
* value.h (VALUE_CONTENTS): Delete macro.
(value_contents, value_contents_writeable): Declare.
* xstormy16-tdep.c, value.c, valops.c, valarith.c: Update.
* stack.c, sparc-tdep.c, sparc64-tdep.c, sh-tdep.c: Update.
* sh64-tdep.c, scm-valprint.c, scm-exp.c, s390-tdep.c: Update.
* rs6000-tdep.c, p-valprint.c, printcmd.c: Update.
* ppc-sysv-tdep.c, mips-tdep.c, mi/mi-main.c: Update.
* m88k-tdep.c, m68hc11-tdep.c, m32r-tdep.c: Update.
* jv-valprint.c, ia64-tdep.c, hppa-tdep.c: Update.
* hpacc-abi.c, f-valprint.c, frv-tdep.c, eval.c: Update.
* c-valprint.c, cris-tdep.c, cp-valprint.c: Update.
* cli/cli-dump.c, breakpoint.c, avr-tdep.c, arm-tdep.c: Update.
* arm-linux-tdep.c, amd64-tdep.c, alpha-tdep.c: Update.
* ada-valprint.c, ada-lang.c: Update.
Diffstat (limited to 'gdb/eval.c')
-rw-r--r-- | gdb/eval.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -209,7 +209,7 @@ evaluate_struct_tuple (struct value *struct_val, struct value *val = NULL; int nlabels = 0; int bitpos, bitsize; - char *addr; + bfd_byte *addr; /* Skip past the labels, and count them. */ while (get_label (exp, pos) != NULL) @@ -315,12 +315,12 @@ evaluate_struct_tuple (struct value *struct_val, bitpos = TYPE_FIELD_BITPOS (struct_type, fieldno); if (variantno >= 0) bitpos += TYPE_FIELD_BITPOS (substruct_type, subfieldno); - addr = VALUE_CONTENTS (struct_val) + bitpos / 8; + addr = value_contents_writeable (struct_val) + bitpos / 8; if (bitsize) modify_field (addr, value_as_long (val), bitpos % 8, bitsize); else - memcpy (addr, VALUE_CONTENTS (val), + memcpy (addr, value_contents (val), TYPE_LENGTH (value_type (val))); } while (--nlabels > 0); @@ -362,7 +362,7 @@ init_array_element (struct value *array, struct value *element, { memcpy (value_contents_raw (array) + (index - low_bound) * element_size, - VALUE_CONTENTS (element), element_size); + value_contents (element), element_size); } } else @@ -371,7 +371,7 @@ init_array_element (struct value *array, struct value *element, if (index < low_bound || index > high_bound) error ("tuple index out of range"); memcpy (value_contents_raw (array) + (index - low_bound) * element_size, - VALUE_CONTENTS (element), element_size); + value_contents (element), element_size); } return index; } @@ -546,7 +546,7 @@ evaluate_subexp_standard (struct type *expect_type, error ("Too many array elements"); memcpy (value_contents_raw (array) + (index - low_bound) * element_size, - VALUE_CONTENTS (element), + value_contents (element), element_size); } index++; @@ -1442,7 +1442,7 @@ evaluate_subexp_standard (struct type *expect_type, if ((TYPE_CODE (value_type (arg1)) == TYPE_CODE_PTR) && (TYPE_CODE (TYPE_TARGET_TYPE (value_type (arg1))) == TYPE_CODE_MEMBER)) { - unsigned int *ptr = (unsigned int *) VALUE_CONTENTS (arg2); /* forces evaluation */ + unsigned int *ptr = (unsigned int *) value_contents (arg2); /* forces evaluation */ *ptr |= 0x20000000; /* set 29th bit */ } } @@ -1939,7 +1939,7 @@ evaluate_subexp_standard (struct type *expect_type, (TYPE_CODE (value_type (retvalp)) == TYPE_CODE_PTR) && (TYPE_CODE (TYPE_TARGET_TYPE (value_type (retvalp))) == TYPE_CODE_MEMBER)) { - unsigned int *ptr = (unsigned int *) VALUE_CONTENTS (retvalp); /* forces evaluation */ + unsigned int *ptr = (unsigned int *) value_contents (retvalp); /* forces evaluation */ *ptr |= 0x20000000; /* set 29th bit */ } return retvalp; |