aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-07 00:09:56 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-07 00:09:56 +0000
commit0fd88904d91d1a137779cd5da6dc9d223fa88d14 (patch)
tree34dfdde621bdd7cfcdbb59c69d53a749c7d48d8f /gdb/value.h
parent1b3a857543e77eedd244b0d7d8cadce4e2e0500e (diff)
downloadgdb-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/value.h')
-rw-r--r--gdb/value.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 7963bf1..50ea6d9 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -106,7 +106,7 @@ struct value
When we store the entire object, `enclosing_type' is the run-time
type -- the complete object -- and `embedded_offset' is the
offset of `type' within that larger type, in bytes. The
- VALUE_CONTENTS macro takes `embedded_offset' into account, so
+ value_contents() macro takes `embedded_offset' into account, so
most GDB code continues to see the `type' portion of the value,
just as the inferior would.
@@ -182,23 +182,23 @@ extern struct type *value_enclosing_type (struct value *);
extern int value_lazy (struct value *);
#define VALUE_LAZY(val) (val)->lazy
-/* VALUE_CONTENTS and value_contents_raw() both return the address of
- the gdb buffer used to hold a copy of the contents of the lval.
- VALUE_CONTENTS is used when the contents of the buffer are needed
+/* value_contents() and value_contents_raw() both return the address
+ of the gdb buffer used to hold a copy of the contents of the lval.
+ value_contents() is used when the contents of the buffer are needed
-- it uses value_fetch_lazy() to load the buffer from the process
- being debugged if it hasn't already been loaded.
- value_contents_raw() is used when data is being stored into the
- buffer, or when it is certain that the contents of the buffer are
- valid.
+ being debugged if it hasn't already been loaded
+ (value_contents_writeable() is used when a writeable but fetched
+ buffer is required).. value_contents_raw() is used when data is
+ being stored into the buffer, or when it is certain that the
+ contents of the buffer are valid.
Note: The contents pointer is adjusted by the offset required to
get to the real subobject, if the value happens to represent
something embedded in a larger run-time object. */
extern bfd_byte *value_contents_raw (struct value *);
-#define VALUE_CONTENTS(val) \
- ((void)(VALUE_LAZY(val) && value_fetch_lazy(val)), \
- (val)->aligner.contents)
+extern const bfd_byte *value_contents (struct value *);
+extern bfd_byte *value_contents_writeable (struct value *);
/* The ALL variants of the above two macros do not adjust the returned
pointer by the embedded_offset value. */