diff options
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r-- | gdb/dwarf2loc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 08b0aa2..8506f3e 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -2121,13 +2121,10 @@ fetch_const_value_from_synthetic_pointer (sect_offset die, LONGEST byte_offset, struct type *type) { struct value *result = NULL; - struct obstack temp_obstack; - struct cleanup *cleanup; const gdb_byte *bytes; LONGEST len; - obstack_init (&temp_obstack); - cleanup = make_cleanup_obstack_free (&temp_obstack); + auto_obstack temp_obstack; bytes = dwarf2_fetch_constant_bytes (die, per_cu, &temp_obstack, &len); if (bytes != NULL) @@ -2144,8 +2141,6 @@ fetch_const_value_from_synthetic_pointer (sect_offset die, LONGEST byte_offset, else result = allocate_optimized_out_value (TYPE_TARGET_TYPE (type)); - do_cleanups (cleanup); - return result; } |