Fix copy-pasto, allocate objfile_per_bfd_storage with obstack_new
[deliverable/binutils-gdb.git] / gdb / symfile.c
index 1e5297ee294215b3b6f5ff86fcc04ea06255e17e..1f5d761877558f3d590888ce3a518612ce054e5b 100644 (file)
@@ -808,8 +808,9 @@ read_symbols (struct objfile *objfile, symfile_add_flags add_flags)
             virtual section-as-bfd like the bfd filename containing the
             section.  Therefore use also non-canonical name form for the same
             file containing the section.  */
-         symbol_file_add_separate (abfd.get (), objfile->original_name,
-                                   add_flags, objfile);
+         symbol_file_add_separate (abfd.get (),
+                                   bfd_get_filename (abfd.get ()),
+                                   add_flags | SYMFILE_NOT_FILENAME, objfile);
        }
     }
   if ((add_flags & SYMFILE_NO_READ) == 0)
@@ -863,7 +864,7 @@ init_entry_point_info (struct objfile *objfile)
       entry_point
        = gdbarch_convert_from_func_ptr_addr (get_objfile_arch (objfile),
                                              entry_point,
-                                             &current_target);
+                                             target_stack);
 
       /* Remove any ISA markers, so that this matches entries in the
         symbol table.  */
@@ -1079,6 +1080,8 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name,
       flags |= OBJF_READNEVER;
       add_flags |= SYMFILE_NO_READ;
     }
+  if ((add_flags & SYMFILE_NOT_FILENAME) != 0)
+    flags |= OBJF_NOT_FILENAME;
 
   /* Give user a chance to burp if we'd be
      interactively wiping out any existing symbols.  */
@@ -2901,7 +2904,7 @@ section_is_mapped (struct obj_section *osect)
          if (osect->ovly_mapped == -1)
            gdbarch_overlay_update (gdbarch, osect);
        }
-      /* fall thru to manual case */
+      /* fall thru */
     case ovly_on:              /* overlay debugging manual */
       return osect->ovly_mapped == 1;
     }
This page took 0.023555 seconds and 4 git commands to generate.