diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-14 09:34:00 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-05-14 09:36:56 -0600 |
commit | 2d79090eabe8aa972b07cb71a3dd73ef9498acfa (patch) | |
tree | 073c76baa38fb17dd45736ae08c34600074f37ab /gdb | |
parent | 864bb26cb34ce6f0a85f83ed38757d5512d07b2a (diff) | |
download | fsf-binutils-gdb-2d79090eabe8aa972b07cb71a3dd73ef9498acfa.zip fsf-binutils-gdb-2d79090eabe8aa972b07cb71a3dd73ef9498acfa.tar.gz fsf-binutils-gdb-2d79090eabe8aa972b07cb71a3dd73ef9498acfa.tar.bz2 |
Clear rust_unions in rust_union_quirks
It turns out that a dwarf2_cu can remain allocated after psymtab
expansion is done, and so it makes sense to clear rust_unions when
done processing it.
Tested on x86-64 Fedora 27.
2018-05-14 Tom Tromey <tom@tromey.com>
* dwarf2read.c (rust_union_quirks): Clear rust_unions.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 67610d7..d795b4a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2018-05-14 Tom Tromey <tom@tromey.com> + + * dwarf2read.c (rust_union_quirks): Clear rust_unions. + 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com> * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 26ec5ef..575d316 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -10105,6 +10105,8 @@ rust_union_quirks (struct dwarf2_cu *cu) gdb_assert (cu->language == language_rust); for (struct type *type : cu->rust_unions) quirk_rust_enum (type, cu->per_cu->dwarf2_per_objfile->objfile); + /* We don't need this any more. */ + cu->rust_unions.clear (); } /* Return the symtab for PER_CU. This works properly regardless of |