aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-10-20 09:30:48 -0600
committerTom Tromey <tom@tromey.com>2017-11-04 10:27:15 -0600
commit33c7c59df060e9952fc2f608c3a6ff0a23ecd40d (patch)
treeeb6725ca4c4c70e816584cd479bc76a34e97031a /gdb/buildsym.h
parentebe6dbc2645081e3a166865f057e7cc9643e7e12 (diff)
downloadgdb-33c7c59df060e9952fc2f608c3a6ff0a23ecd40d.zip
gdb-33c7c59df060e9952fc2f608c3a6ff0a23ecd40d.tar.gz
gdb-33c7c59df060e9952fc2f608c3a6ff0a23ecd40d.tar.bz2
Replace really_free_pendings with a scoped_ class
This introduces scoped_free_pendings, and changes users of really_free_pendings to use it instead, removing some clenaups. I tried to examine the affected code to ensure there aren't dangling cleanups in the vicinity. gdb/ChangeLog 2017-11-04 Tom Tromey <tom@tromey.com> * dwarf2read.c (process_full_comp_unit, process_full_type_unit): Use scoped_free_pendings. * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use scoped_free_pendings. * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings. (xcoff_initial_scan): Likewise. * buildsym.c (reset_symtab_globals): Update comment. (scoped_free_pendings): Rename from really_free_pendings. (prepare_for_building): Update comment. (buildsym_init): Likewise. * buildsym.h (class scoped_free_pendings): New class. (really_free_pendings): Don't declare.
Diffstat (limited to 'gdb/buildsym.h')
-rw-r--r--gdb/buildsym.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index 60109a0..accb1f0 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -212,7 +212,15 @@ extern struct block *finish_block (struct symbol *symbol,
extern void record_block_range (struct block *,
CORE_ADDR start, CORE_ADDR end_inclusive);
-extern void really_free_pendings (void *dummy);
+class scoped_free_pendings
+{
+public:
+
+ scoped_free_pendings () = default;
+ ~scoped_free_pendings ();
+
+ DISABLE_COPY_AND_ASSIGN (scoped_free_pendings);
+};
extern void start_subfile (const char *name);