diff options
author | Tristan Gingold <gingold@adacore.com> | 2009-11-18 14:10:47 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2009-11-18 14:10:47 +0000 |
commit | ab7e10a0c4f73abe3e26911214b7772e77466f6c (patch) | |
tree | ce29545ee6794c1b00d609f674eecb2c882c5185 /gdb/machoread.c | |
parent | 2d0f3896005097776f6bd807c7df97bbb6c99dd9 (diff) | |
download | fsf-binutils-gdb-ab7e10a0c4f73abe3e26911214b7772e77466f6c.zip fsf-binutils-gdb-ab7e10a0c4f73abe3e26911214b7772e77466f6c.tar.gz fsf-binutils-gdb-ab7e10a0c4f73abe3e26911214b7772e77466f6c.tar.bz2 |
2009-11-18 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_oso_symfile): Fix typo. Add comments.
Diffstat (limited to 'gdb/machoread.c')
-rw-r--r-- | gdb/machoread.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/machoread.c b/gdb/machoread.c index ac7063d..ebd90c6 100644 --- a/gdb/machoread.c +++ b/gdb/machoread.c @@ -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++) |