diff options
author | Nicolas Blanc <nicolas.blanc@intel.com> | 2013-03-12 11:10:18 +0100 |
---|---|---|
committer | Nicolas Blanc <nicolas.blanc@intel.com> | 2013-10-29 10:56:07 +0100 |
commit | 63644780babdca3f40e1978a236b6cd78473c91b (patch) | |
tree | 03ed0d042a594a71df9c9921b1c8f9c1018675f0 /gdb/printcmd.c | |
parent | 487ad57ccfe1434e21774117d20dfd9e23f12afa (diff) | |
download | gdb-63644780babdca3f40e1978a236b6cd78473c91b.zip gdb-63644780babdca3f40e1978a236b6cd78473c91b.tar.gz gdb-63644780babdca3f40e1978a236b6cd78473c91b.tar.bz2 |
New remove-symbol-file command.
New command for removing symbol files added via
the add-symbol-file command.
2013-10-29 Nicolas Blanc <nicolas.blanc@intel.com>
* breakpoint.c (disable_breakpoints_in_freed_objfile): New function.
* objfiles.c (free_objfile): Notify free_objfile.
(is_addr_in_objfile): New function.
* objfiles.h (is_addr_in_objfile): New declaration.
* printcmd.c (clear_dangling_display_expressions): Act upon free_objfile
events instead of solib_unloaded events.
(_initialize_printcmd): Register observer for free_objfile instead
of solib_unloaded notifications.
* solib.c (remove_user_added_objfile): New function.
* symfile.c (remove_symbol_file_command): New command.
(_initialize_symfile): Add remove-symbol-file.
gdb/doc
* observer.texi: New free_objfile event.
Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r-- | gdb/printcmd.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 9bca6dd..7354474 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1940,21 +1940,24 @@ disable_display_command (char *args, int from_tty) an item by re-parsing .exp_string field in the new execution context. */ static void -clear_dangling_display_expressions (struct so_list *solib) +clear_dangling_display_expressions (struct objfile *objfile) { - struct objfile *objfile = solib->objfile; struct display *d; + struct program_space *pspace; /* With no symbol file we cannot have a block or expression from it. */ if (objfile == NULL) return; + pspace = objfile->pspace; if (objfile->separate_debug_objfile_backlink) - objfile = objfile->separate_debug_objfile_backlink; - gdb_assert (objfile->pspace == solib->pspace); + { + objfile = objfile->separate_debug_objfile_backlink; + gdb_assert (objfile->pspace == pspace); + } for (d = display_chain; d != NULL; d = d->next) { - if (d->pspace != solib->pspace) + if (d->pspace != pspace) continue; if (lookup_objfile_from_block (d->block) == objfile @@ -2487,7 +2490,7 @@ _initialize_printcmd (void) current_display_number = -1; - observer_attach_solib_unloaded (clear_dangling_display_expressions); + observer_attach_free_objfile (clear_dangling_display_expressions); add_info ("address", address_info, _("Describe where symbol SYM is stored.")); |