diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-02-08 04:15:39 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-02-08 04:15:39 +0000 |
commit | 5086187cf9ff8626f0ef2ee885be62dde9eae4d6 (patch) | |
tree | 941724cce081d5f6f255a25dffbe3ef318158873 | |
parent | 300475fe9d2e1ffb2ea4bb7f7d3fe9a11bbf8c43 (diff) | |
download | gdb-5086187cf9ff8626f0ef2ee885be62dde9eae4d6.zip gdb-5086187cf9ff8626f0ef2ee885be62dde9eae4d6.tar.gz gdb-5086187cf9ff8626f0ef2ee885be62dde9eae4d6.tar.bz2 |
2005-02-07 Andrew Cagney <cagney@gnu.org>
* cp-valprint.c, c-valprint.c, infcall.c: Use value_contents or
value_contents_writeable, include note that there are problems.
* breakpoint.c, infcall.c: Use VALUE_LVAL.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/breakpoint.c | 5 | ||||
-rw-r--r-- | gdb/c-valprint.c | 3 | ||||
-rw-r--r-- | gdb/cp-valprint.c | 3 | ||||
-rw-r--r-- | gdb/infcall.c | 5 |
5 files changed, 14 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9d3c61f..6f7da53 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2005-02-07 Andrew Cagney <cagney@gnu.org> + * cp-valprint.c, c-valprint.c, infcall.c: Use value_contents or + value_contents_writeable, include note that there are problems. + * breakpoint.c, infcall.c: Use VALUE_LVAL. + * value.h (set_value_offset): Declare. * value.c (set_value_offset): Declare. * gnu-v2-abi.c, jv-valprint.c, valarith.c, valops.c: Update. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 0a117d2..da37ea8 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -5821,9 +5821,10 @@ can_use_hardware_watchpoint (struct value *v) } } } - else if (v->lval != not_lval && deprecated_value_modifiable (v) == 0) + else if (VALUE_LVAL (v) != not_lval + && deprecated_value_modifiable (v) == 0) return 0; /* ??? What does this represent? */ - else if (v->lval == lval_register) + else if (VALUE_LVAL (v) == lval_register) return 0; /* cannot watch a register with a HW watchpoint */ } diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 948f5d8..e9372fb 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -551,7 +551,8 @@ c_value_print (struct value *val, struct ui_file *stream, int format, type = lookup_reference_type (real_type); } /* JYG: Need to adjust pointer value. */ - val->aligner.contents[0] -= top; + /* NOTE: cagney/2005-01-02: THIS IS BOGUS. */ + value_contents_writeable (val)[0] -= top; /* Note: When we look up RTTI entries, we don't get any information on const or volatile attributes */ diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 2cff8e7..d662d31 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -784,7 +784,8 @@ cp_print_hpacc_virtual_table_entries (struct type *type, int *vfuncs, if (value_lazy (vf)) (void) value_fetch_lazy (vf); /* adjust by offset */ - vf->aligner.contents[0] += 4 * (HP_ACC_VFUNC_START + vx); + /* NOTE: cagney/2005-01-02: THIS IS BOGUS. */ + value_contents_writeable (vf)[0] += 4 * (HP_ACC_VFUNC_START + vx); vf = value_ind (vf); /* get the entry */ /* make it a pointer */ deprecated_set_value_type (vf, value_type (v)); diff --git a/gdb/infcall.c b/gdb/infcall.c index f91777c..e2ef6b4 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -536,10 +536,11 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) this point. */ /* Go see if the actual parameter is a variable of type pointer to function or just a function. */ - if (args[i]->lval == not_lval) + if (VALUE_LVAL (args[i]) == not_lval) { char *arg_name; - if (find_pc_partial_function ((CORE_ADDR) args[i]->aligner.contents[0], &arg_name, NULL, NULL)) + /* NOTE: cagney/2005-01-02: THIS IS BOGUS. */ + if (find_pc_partial_function ((CORE_ADDR) value_contents (args[i])[0], &arg_name, NULL, NULL)) error ("\ You cannot use function <%s> as argument. \n\ You must use a pointer to function type variable. Command ignored.", arg_name); |