X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fsymfile.c;h=965237191ad197e8c173f07c62c052ead83b95df;hb=268e4f09144c48e02f01d82ab3aab359457df214;hp=8e3cf7f23e57b8740edbd54dc6e22eb9d23c5abf;hpb=f65fe5704af56aca58fd5547d0841a9512e540af;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/symfile.c b/gdb/symfile.c index 8e3cf7f23e..965237191a 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -940,7 +940,7 @@ syms_from_objfile_1 (struct objfile *objfile, if an error occurs during symbol reading. */ gdb::optional defer_clear_users; - std::unique_ptr objfile_holder (objfile); + objfile_up objfile_holder (objfile); /* If ADDRS is NULL, put together a dummy address list. We now establish the convention that an addr of zero means @@ -958,7 +958,7 @@ syms_from_objfile_1 (struct objfile *objfile, if (symfile_objfile != NULL) { - delete symfile_objfile; + symfile_objfile->unlink (); gdb_assert (symfile_objfile == NULL); } @@ -2438,7 +2438,7 @@ remove_symbol_file_command (const char *args, int from_tty) objfile_name (objf))) error (_("Not confirmed.")); - delete objf; + objf->unlink (); clear_symtab_users (0); } @@ -2495,7 +2495,7 @@ reread_symbols (void) /* If we get an error, blow away this objfile (not sure if that is the correct response for things like shared libraries). */ - std::unique_ptr objfile_holder (objfile); + objfile_up objfile_holder (objfile); /* We need to do this whenever any symbols go away. */ clear_symtab_users_cleanup defer_clear_users (0);