2009-11-18 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Wed, 18 Nov 2009 14:10:47 +0000 (14:10 +0000)
committerTristan Gingold <gingold@adacore.com>
Wed, 18 Nov 2009 14:10:47 +0000 (14:10 +0000)
* machoread.c (macho_oso_symfile): Fix typo.  Add comments.

gdb/ChangeLog
gdb/machoread.c

index f966e9d355e1f92b2229f8033a3fd24ddd29d46b..3d98d1bc0541df4eed6edc7ddab84215583f7056 100644 (file)
@@ -1,3 +1,7 @@
+2009-11-18  Tristan Gingold  <gingold@adacore.com>
+
+       * machoread.c (macho_oso_symfile): Fix typo.  Add comments.
+
 2009-11-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * dbxread.c (set_namestring): Remove cast to unsigned.  Check N_STRX
index ac7063dd0d3fd32d816a5910ec9121a6a962aa38..ebd90c61c8da0329d3b251573999effad97b592c 100644 (file)
@@ -429,6 +429,7 @@ macho_oso_symfile (struct objfile *main_objfile)
              const char *member_name = member_bfd->filename;
               int member_len = strlen (member_name);
 
+              /* If this member is referenced, add it as a symfile.  */
               for (ix2 = ix; ix2 < last_ix; ix2++)
                 {
                   oso2 = VEC_index (oso_el, vec, ix2);
@@ -447,7 +448,9 @@ macho_oso_symfile (struct objfile *main_objfile)
               prev = member_bfd;
              member_bfd = bfd_openr_next_archived_file
                (archive_bfd, member_bfd);
-              if (ix2 < last_ix)
+
+              /* Free previous member if not referenced by an oso.  */
+              if (ix2 >= last_ix)
                 bfd_close (prev);
            }
           for (ix2 = ix; ix2 < last_ix; ix2++)
This page took 0.033217 seconds and 4 git commands to generate.