diff options
author | Tom Tromey <tom@tromey.com> | 2017-10-08 12:20:49 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-10-08 23:07:37 -0600 |
commit | 757325a3f24e01bf8e7b7214f33c546bc52d1d12 (patch) | |
tree | dcc5507c805dd3805e066c269d4154b50f3e0f19 /gdb/dwarf2loc.c | |
parent | b9c04fb2681dd5706d2cafa5dcc6bdcd99016cf4 (diff) | |
download | binutils-757325a3f24e01bf8e7b7214f33c546bc52d1d12.zip binutils-757325a3f24e01bf8e7b7214f33c546bc52d1d12.tar.gz binutils-757325a3f24e01bf8e7b7214f33c546bc52d1d12.tar.bz2 |
Remove make_cleanup_value_free
This removes make_cleanup_value_free, in favor of a unique_ptr
specialization.
Regression tested by the buildbot.
gdb/ChangeLog
2017-10-08 Tom Tromey <tom@tromey.com>
* utils.h (make_cleanup_value_free): Remove.
* utils.c (do_value_free, struct cleanup): Remove.
* dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
Use gdb_value_up.
* value.h (struct value_deleter): New.
(gdb_value_up): New typedef.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r-- | gdb/dwarf2loc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index c485eaf..fe2fea0 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -2478,7 +2478,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, size_t len = TYPE_LENGTH (subobj_type); size_t max = TYPE_LENGTH (type); struct gdbarch *objfile_gdbarch = get_objfile_arch (objfile); - struct cleanup *cleanup; if (subobj_byte_offset + len > max) invalid_synthetic_pointer (); @@ -2488,7 +2487,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, below. */ value_incref (value); free_values.free_to_mark (); - cleanup = make_cleanup_value_free (value); + gdb_value_up value_holder (value); retval = allocate_value (subobj_type); @@ -2498,8 +2497,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, memcpy (value_contents_raw (retval), value_contents_all (value) + subobj_byte_offset, len); - - do_cleanups (cleanup); } break; |