aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2016-11-21 16:50:20 -0700
committerTom Tromey <tom@tromey.com>2017-01-10 19:14:12 -0700
commit906768f970826102252e8cfd30ee72da71de29f7 (patch)
tree638e59e15edbea5651e05a0d8739ede2b2276188 /gdb/dwarf2read.c
parentbef155c3e8a995fcdb1c2ba5aba012eb653d9f30 (diff)
downloadgdb-906768f970826102252e8cfd30ee72da71de29f7.zip
gdb-906768f970826102252e8cfd30ee72da71de29f7.tar.gz
gdb-906768f970826102252e8cfd30ee72da71de29f7.tar.bz2
Remove make_cleanup_discard_psymtabs
This removes make_cleanup_discard_psymtabs in favor of a new class. 2017-01-10 Tom Tromey <tom@tromey.com> * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder. * psympriv.h (make_cleanup_discard_psymtabs): Don't declare. * psymtab.c (discard_psymtabs_upto): Remove. (make_cleanup_discard_psymtabs): Remove. (struct psymtab_state): Remove.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index dfb79c9..b5dc510 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -4271,10 +4271,9 @@ dwarf2_build_psymtabs (struct objfile *objfile)
/* This isn't really ideal: all the data we allocate on the
objfile's obstack is still uselessly kept around. However,
freeing it seems unsafe. */
- struct cleanup *cleanups = make_cleanup_discard_psymtabs (objfile);
-
+ psymtab_discarder psymtabs (objfile);
dwarf2_build_psymtabs_hard (objfile);
- discard_cleanups (cleanups);
+ psymtabs.keep ();
}
CATCH (except, RETURN_MASK_ERROR)
{