aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-17 16:43:53 -0600
committerTom Tromey <tom@tromey.com>2018-05-18 14:10:09 -0600
commit3063847f29cb83bae0cdf018c2dca68b65a50780 (patch)
treed0a312f21aa8e9ccc11dec7965e0ff27137ed052 /gdb/dwarf2read.h
parent6487709f3fca687ba1420b6487db5cd1e7cf8cde (diff)
downloadgdb-3063847f29cb83bae0cdf018c2dca68b65a50780.zip
gdb-3063847f29cb83bae0cdf018c2dca68b65a50780.tar.gz
gdb-3063847f29cb83bae0cdf018c2dca68b65a50780.tar.bz2
Use new to allocate mapped_index
This changes struct mapped_index to be allocated with new. This simplifies the creation a bit (see dwarf2_read_index) and also removes a somewhat ugly explicit destructor call from ~dwarf2_per_objfile. Tested by the buildbot. gdb/ChangeLog 2018-05-18 Tom Tromey <tom@tromey.com> * dwarf2read.c (dwarf2_per_objfile): Update. (struct mapped_index): Add initializers. (dwarf2_read_index): Use new. (dw2_symtab_iter_init): Update. * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a unique_ptr.
Diffstat (limited to 'gdb/dwarf2read.h')
-rw-r--r--gdb/dwarf2read.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2read.h b/gdb/dwarf2read.h
index 8e6c41d..f36d039 100644
--- a/gdb/dwarf2read.h
+++ b/gdb/dwarf2read.h
@@ -209,7 +209,7 @@ public:
bool using_index = false;
/* The mapped index, or NULL if .gdb_index is missing or not being used. */
- mapped_index *index_table = NULL;
+ std::unique_ptr<mapped_index> index_table;
/* The mapped index, or NULL if .debug_names is missing or not being used. */
std::unique_ptr<mapped_debug_names> debug_names_table;