Add set/show debug dwarf-line.
[deliverable/binutils-gdb.git] / gdb / objfiles.c
index c397f6872c1a85fa962b682f8a633d1182f75f10..c6f9f001a3c687658b711eb751344e2f22719996 100644 (file)
@@ -301,7 +301,8 @@ allocate_objfile (bfd *abfd, const char *name, int flags)
       gdb_assert ((flags & OBJF_NOT_FILENAME) != 0);
       expanded_name = xstrdup ("<<anonymous objfile>>");
     }
-  else if ((flags & OBJF_NOT_FILENAME) != 0)
+  else if ((flags & OBJF_NOT_FILENAME) != 0
+          || is_target_filename (name))
     expanded_name = xstrdup (name);
   else
     expanded_name = gdb_abspath (name);
@@ -1492,7 +1493,7 @@ default_iterate_over_objfiles_in_search_order
     }
 }
 
-/* Return canonical name for OBJFILE.  */
+/* See objfiles.h.  */
 
 const char *
 objfile_name (const struct objfile *objfile)
@@ -1505,6 +1506,17 @@ objfile_name (const struct objfile *objfile)
 
 /* See objfiles.h.  */
 
+const char *
+objfile_filename (const struct objfile *objfile)
+{
+  if (objfile->obfd != NULL)
+    return bfd_get_filename (objfile->obfd);
+
+  return NULL;
+}
+
+/* See objfiles.h.  */
+
 const char *
 objfile_debug_name (const struct objfile *objfile)
 {
This page took 0.025296 seconds and 4 git commands to generate.