diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-02-02 21:36:17 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-02-02 21:36:17 +0000 |
commit | 46615f07c3db91f7a0f138baec128749604dca43 (patch) | |
tree | 0c281bc164e338ce3b4bc9aedc5821ccab65a223 /gdb/valops.c | |
parent | 1b9afc0454112ae9ac41f6e8ee45ca915f97adc8 (diff) | |
download | gdb-46615f07c3db91f7a0f138baec128749604dca43.zip gdb-46615f07c3db91f7a0f138baec128749604dca43.tar.gz gdb-46615f07c3db91f7a0f138baec128749604dca43.tar.bz2 |
2005-02-02 Andrew Cagney <cagney@gnu.org>
* value.h (VALUE_CONTENTS_ALL): Delete.
(value_contents_all): Declare.
* value.c (value_contents_all): New function.
* hpacc-abi.c, cp-valprint.c, valops.c, c-valprint.c: Update.
* m68k-tdep.c, i386-tdep.c, infcall.c, valops.c: Update.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index ac55d53..50b7e7c 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -485,10 +485,11 @@ value_at_lazy (struct type *type, CORE_ADDR addr) return val; } -/* Called only from the VALUE_CONTENTS and VALUE_CONTENTS_ALL macros, - if the current data for a variable needs to be loaded into +/* Called only from the VALUE_CONTENTS and value_contents_all() + macros, if the current data for a variable needs to be loaded into VALUE_CONTENTS(VAL). Fetches the data from the user's process, and - clears the lazy flag to indicate that the data in the buffer is valid. + clears the lazy flag to indicate that the data in the buffer is + valid. If the value is zero-length, we avoid calling read_memory, which would abort. We mark the value as fetched anyway -- all 0 bytes of it. @@ -1023,7 +1024,7 @@ value_array (int lowbound, int highbound, struct value **elemvec) for (idx = 0; idx < nelem; idx++) { memcpy (value_contents_all_raw (val) + (idx * typelength), - VALUE_CONTENTS_ALL (elemvec[idx]), + value_contents_all (elemvec[idx]), typelength); } return val; @@ -1037,7 +1038,8 @@ value_array (int lowbound, int highbound, struct value **elemvec) addr = allocate_space_in_inferior (nelem * typelength); for (idx = 0; idx < nelem; idx++) { - write_memory (addr + (idx * typelength), VALUE_CONTENTS_ALL (elemvec[idx]), + write_memory (addr + (idx * typelength), + value_contents_all (elemvec[idx]), typelength); } @@ -1503,7 +1505,7 @@ search_struct_method (char *name, struct value **arg1p, according to HP/Taligent runtime spec. */ int skip; find_rt_vbase_offset (type, TYPE_BASECLASS (type, i), - VALUE_CONTENTS_ALL (*arg1p), + value_contents_all (*arg1p), offset + VALUE_EMBEDDED_OFFSET (*arg1p), &base_offset, &skip); if (skip >= 0) @@ -1737,7 +1739,7 @@ find_method_list (struct value **argp, char *method, int offset, * according to HP/Taligent runtime spec. */ int skip; find_rt_vbase_offset (type, TYPE_BASECLASS (type, i), - VALUE_CONTENTS_ALL (*argp), + value_contents_all (*argp), offset + VALUE_EMBEDDED_OFFSET (*argp), &base_offset, &skip); if (skip >= 0) |