SHF_GNU_RETAIN 7a and 7b tests
[binutils-gdb.git] / gdb / symfile-mem.c
index 02761df679af33e8bc4a60fd1cc27293a2ae5d4f..3790baeab487ce361daf509048653d7316ac9919 100644 (file)
@@ -122,7 +122,7 @@ symbol_file_add_from_memory (struct bfd *templ, CORE_ADDR addr,
   objf = symbol_file_add_from_bfd (nbfd, bfd_get_filename (nbfd),
                                   add_flags, &sai, OBJF_SHARED, NULL);
 
-  add_target_sections_of_objfile (objf);
+  current_program_space->add_target_sections (objf);
 
   /* This might change our ideas about frames already looked at.  */
   reinit_frame_cache ();
@@ -143,8 +143,8 @@ add_symbol_file_from_memory_command (const char *args, int from_tty)
   addr = parse_and_eval_address (args);
 
   /* We need some representative bfd to know the target we are looking at.  */
-  if (symfile_objfile != NULL)
-    templ = symfile_objfile->obfd;
+  if (current_program_space->symfile_object_file != NULL)
+    templ = current_program_space->symfile_object_file->obfd;
   else
     templ = current_program_space->exec_bfd ();
   if (templ == NULL)
@@ -209,12 +209,12 @@ void
 _initialize_symfile_mem ()
 {
   add_cmd ("add-symbol-file-from-memory", class_files,
-           add_symbol_file_from_memory_command,
+          add_symbol_file_from_memory_command,
           _("Load the symbols out of memory from a "
             "dynamically loaded object file.\n"
             "Give an expression for the address "
             "of the file's shared object file header."),
-           &cmdlist);
+          &cmdlist);
 
   /* Want to know of each new inferior so that its vsyscall info can
      be extracted.  */