aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-07-17 15:22:30 +0000
committerTom Tromey <tromey@redhat.com>2013-07-17 15:22:30 +0000
commit626f2d1cfd2931fd1a7fc95db9ae4b99afbc5973 (patch)
tree096ddfb4db7459c5542fb9e1084b2e1a74b80e89 /gdb/dwarf2read.c
parentb56e23fb1f0fc7545b9b04fd896baaac3e8aa735 (diff)
downloadgdb-626f2d1cfd2931fd1a7fc95db9ae4b99afbc5973.zip
gdb-626f2d1cfd2931fd1a7fc95db9ae4b99afbc5973.tar.gz
gdb-626f2d1cfd2931fd1a7fc95db9ae4b99afbc5973.tar.bz2
* dwarf2read.c (dwarf2_per_objfile_free): Clear
dwarf2_per_objfile.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 62e42ca..94727a7 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -20546,6 +20546,10 @@ dwarf2_per_objfile_free (struct objfile *objfile, void *d)
struct dwarf2_per_objfile *data = d;
int ix;
+ /* Make sure we don't accidentally use dwarf2_per_objfile while
+ cleaning up. */
+ dwarf2_per_objfile = NULL;
+
for (ix = 0; ix < data->n_comp_units; ++ix)
VEC_free (dwarf2_per_cu_ptr, data->all_comp_units[ix]->imported_symtabs);