Do not overwrite so_list's so_name in solib_map_sections
authorJoel Brobecker <brobecker@gnat.com>
Thu, 11 Apr 2013 01:18:49 +0000 (01:18 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Thu, 11 Apr 2013 01:18:49 +0000 (01:18 +0000)
gdb/ChangeLog:

        * solib.c (solib_map_sections): Remove code overwriting
        SO->SO_NAME with the bfd's filename.

gdb/ChangeLog
gdb/solib.c

index 89b787b57f325ab02043578465c0d613bbe6341b..b9896abea0a7fa24ad6069d3e9bb2b02bd0b6e47 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-10  Joel Brobecker  <brobecker@adacore.com>
+
+       * solib.c (solib_map_sections): Remove code overwriting
+       SO->SO_NAME with the bfd's filename.
+
 2013-04-10  Pedro Alves  <palves@redhat.com>
 
        * cli/cli-decode.c (integer_unlimited_completer): New function.
 2013-04-10  Pedro Alves  <palves@redhat.com>
 
        * cli/cli-decode.c (integer_unlimited_completer): New function.
index 8129c0fb524b67e5734bab4f484aae959119e89c..69786774fe0b8d9bb390263123ea505303ef3222 100644 (file)
@@ -465,12 +465,6 @@ solib_map_sections (struct so_list *so)
   /* Leave bfd open, core_xfer_memory and "info files" need it.  */
   so->abfd = abfd;
 
   /* Leave bfd open, core_xfer_memory and "info files" need it.  */
   so->abfd = abfd;
 
-  /* copy full path name into so_name, so that later symbol_file_add
-     can find it.  */
-  if (strlen (bfd_get_filename (abfd)) >= SO_NAME_MAX_PATH_SIZE)
-    error (_("Shared library file name is too long."));
-  strcpy (so->so_name, bfd_get_filename (abfd));
-
   if (build_section_table (abfd, &so->sections, &so->sections_end))
     {
       error (_("Can't find the file sections in `%s': %s"),
   if (build_section_table (abfd, &so->sections, &so->sections_end))
     {
       error (_("Can't find the file sections in `%s': %s"),