diff options
author | Tristan Gingold <gingold@adacore.com> | 2009-12-15 09:56:23 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2009-12-15 09:56:23 +0000 |
commit | 6414f3fd8b6badcb210002f54e10b49156e4da75 (patch) | |
tree | a0052f64f152478a603cd967d45ba4e63d8f6f11 /gdb | |
parent | 7f7828f676d00c8ef2befefd7912fafa9cda1a1b (diff) | |
download | gdb-6414f3fd8b6badcb210002f54e10b49156e4da75.zip gdb-6414f3fd8b6badcb210002f54e10b49156e4da75.tar.gz gdb-6414f3fd8b6badcb210002f54e10b49156e4da75.tar.bz2 |
2009-12-15 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_symfile_read): Set section size of dsym bfd
from main bfd.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/machoread.c | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d73ddd3..024ab27 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2009-12-15 Tristan Gingold <gingold@adacore.com> + * machoread.c (macho_symfile_read): Set section size of dsym bfd + from main bfd. + +2009-12-15 Tristan Gingold <gingold@adacore.com> + * machoread.c (macho_check_dsym): Read uuid directly from load command instead of from a fake section. diff --git a/gdb/machoread.c b/gdb/machoread.c index 0194ee5..12fefaf 100644 --- a/gdb/machoread.c +++ b/gdb/machoread.c @@ -626,6 +626,7 @@ macho_symfile_read (struct objfile *objfile, int symfile_flags) { int ix; oso_el *oso; + struct bfd_section *asect, *dsect; if (mach_o_debug_level > 0) printf_unfiltered (_("dsym file found\n")); @@ -639,6 +640,17 @@ macho_symfile_read (struct objfile *objfile, int symfile_flags) VEC_free (oso_el, oso_vector); oso_vector = NULL; + /* Set dsym section size. */ + for (asect = objfile->obfd->sections, dsect = dsym_bfd->sections; + asect && dsect; + asect = asect->next, dsect = dsect->next) + { + if (strcmp (asect->name, dsect->name) != 0) + break; + bfd_set_section_size (dsym_bfd, dsect, + bfd_get_section_size (asect)); + } + /* Add the dsym file as a separate file. */ symbol_file_add_separate (dsym_bfd, symfile_flags, objfile); |