diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-02-27 21:24:27 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-02-27 21:24:27 +0000 |
commit | 7d48863994082180cf61f25797a553f7cddcd311 (patch) | |
tree | 3c8c69f2c193f17d4b1558a2da6df07a702d55fc /gdb | |
parent | 0adea5f702d7d2a2e4441c18556402ba415e9c2e (diff) | |
download | gdb-7d48863994082180cf61f25797a553f7cddcd311.zip gdb-7d48863994082180cf61f25797a553f7cddcd311.tar.gz gdb-7d48863994082180cf61f25797a553f7cddcd311.tar.bz2 |
2011-02-27 Michael Snyder <msnyder@vmware.com>
* d-valprint.c (dynamic_array_type): Avoid shadowing a function
param with a local variable of the same name.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/d-valprint.c | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ab012b2..a2d9a05 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2011-02-27 Michael Snyder <msnyder@vmware.com> + * d-valprint.c (dynamic_array_type): Avoid shadowing a function + param with a local variable of the same name. + +2011-02-27 Michael Snyder <msnyder@vmware.com> + * value.c (value_from_history_ref): New function. * value.h (value_from_history_ref): Export. * cli/cli-utils.c (get_number_trailer): Use value_from_history_ref diff --git a/gdb/d-valprint.c b/gdb/d-valprint.c index 969cfe2..e843099 100644 --- a/gdb/d-valprint.c +++ b/gdb/d-valprint.c @@ -45,7 +45,7 @@ dynamic_array_type (struct type *type, const gdb_byte *valaddr, struct type *elttype; struct type *true_type; struct type *ptr_type; - struct value *val; + struct value *ival; int length; length = unpack_field_as_long (type, valaddr + embedded_offset, 0); @@ -58,12 +58,12 @@ dynamic_array_type (struct type *type, const gdb_byte *valaddr, true_type = check_typedef (elttype); true_type = lookup_array_range_type (true_type, 0, length - 1); - val = value_at (true_type, addr); + ival = value_at (true_type, addr); return d_val_print (true_type, - value_contents_for_printing (val), - value_embedded_offset (val), addr, - stream, recurse + 1, val, options); + value_contents_for_printing (ival), + value_embedded_offset (ival), addr, + stream, recurse + 1, ival, options); } return -1; } |