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>
Documentation for the remove-symbol-file command.

2013-10-29  Nicolas Blanc  <nicolas.blanc@intel.com>

	* NEWS: Add description of the remove-symbol-file command.
gdb/doc
	* gdb.texinfo (Commands to Specify Files): Add description
	of the remove-symbol-file command.

Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>
Create target sections for user-added symbol files.

Add the sections of the symbol files that are provided via
'add-symbol-file' to the set of current target sections.
User-added sections are removed upon notification of free_objfile
when their corresponding object file is deleted.

2013-10-29  Nicolas Blanc  <nicolas.blanc@intel.com>

	* exec.h (add_target_sections_of_objfile): New declaration.
	* exec.c (add_target_sections_of_objfile): New function.
	* symfile.c (add_symbol_file_command): Update current target sections.
	(symfile_free_objfile): New function.
	(_initialize_symfile): Register observer for free_objfile events.

Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>
Function is_elf_target.

2013-10-29  Nicolas Blanc  <nicolas.blanc@intel.com>

gdb/testsuite
	* lib/gdb.exp (is_elf_target): New function.

Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>
Test adding and removing a symbol file at runtime.

This test exercises the commands 'add-symbol-file'
and 'remove-symbol-file'.

2013-10-29  Nicolas Blanc  <nicolas.blanc@intel.com>

gdb/testsuite
	* gdb.base/sym-file-lib.c: New file.
	* gdb.base/sym-file-loader.c: New file.
	* gdb.base/sym-file-loader.h: New file.
	* gdb.base/sym-file-main.c: New file.
	* gdb.base/sym-file.exp: New file.

Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>