diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 14:25:29 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:22:16 -0700 |
commit | cdf3de175d41acec85d6c3cc8b599f79658edb06 (patch) | |
tree | 7f88b2ac4f2fb3ca547575063bae003ade56abab /gdb/dwarf2 | |
parent | d3824ae14ac64c10733537969a0bd58a9385cbf2 (diff) | |
download | gdb-cdf3de175d41acec85d6c3cc8b599f79658edb06.zip gdb-cdf3de175d41acec85d6c3cc8b599f79658edb06.tar.gz gdb-cdf3de175d41acec85d6c3cc8b599f79658edb06.tar.bz2 |
Turn value_incref and value_decref into methods
This changes value_incref and value_decref to be methods of value.
Much of this patch was written by script.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r-- | gdb/dwarf2/expr.c | 4 | ||||
-rw-r--r-- | gdb/dwarf2/loc.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c index ef93b89..f2a1305 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -128,7 +128,7 @@ allocate_piece_closure (dwarf2_per_cu_data *per_cu, for (dwarf_expr_piece &piece : c->pieces) if (piece.location == DWARF_VALUE_STACK) - value_incref (piece.v.value); + piece.v.value->incref (); return c; } @@ -620,7 +620,7 @@ free_pieced_value_closure (value *v) { for (dwarf_expr_piece &p : c->pieces) if (p.location == DWARF_VALUE_STACK) - value_decref (p.v.value); + p.v.value->decref (); delete c; } diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c index 0aa6aaf..64a7e03 100644 --- a/gdb/dwarf2/loc.c +++ b/gdb/dwarf2/loc.c @@ -1280,7 +1280,7 @@ entry_data_value_coerce_ref (const struct value *value) return NULL; target_val = (struct value *) value->computed_closure (); - value_incref (target_val); + target_val->incref (); return target_val; } @@ -1291,7 +1291,7 @@ entry_data_value_copy_closure (const struct value *v) { struct value *target_val = (struct value *) v->computed_closure (); - value_incref (target_val); + target_val->incref (); return target_val; } @@ -1302,7 +1302,7 @@ entry_data_value_free_closure (struct value *v) { struct value *target_val = (struct value *) v->computed_closure (); - value_decref (target_val); + target_val->decref (); } /* Vector for methods for an entry value reference where the referenced value |