cleanup: use value_lazy_at instead of allocate_value_lazy/attribute setter
authorSanimir Agovic <sagovic@sourceware.org>
Thu, 29 Aug 2013 12:25:03 +0000 (12:25 +0000)
committerSanimir Agovic <sagovic@sourceware.org>
Thu, 29 Aug 2013 12:25:03 +0000 (12:25 +0000)
commit08039c9efdbe7602bfb0d1b4396a3f3a39130239
treeafe0ee66e5898cb06bffecb52789cc2bddd8abf3
parent314c7de970512fe51bcd24829306c4aee2ada762
cleanup: use value_lazy_at instead of allocate_value_lazy/attribute setter

I came across a pattern used to construct a value in the following way:

  struct value *val = allocate_value_lazy (type);
  VALUE_LVAL (val) = lval_memory;
  set_value_address (val, address);

Instead we fold the above call into:

  value_at_lazy (type, addr);

2013-08-27  Sanimir Agovic  <sanimir.agovic@intel.com>

* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use value_at_lazy instead
of assembling value via allocate_value_lazy and attribute setter.
* findvar.c (default_read_var_value): Use value_at_lazy instead of
assembling value via allocate_value_lazy and attribute setter.
* valops.c (do_search_struct_field): Use value_at_lazy instead of
assembling value via allocate_value_lazy and attribute setter.
gdb/ChangeLog
gdb/dwarf2loc.c
gdb/findvar.c
gdb/valops.c
This page took 0.056268 seconds and 4 git commands to generate.