diff options
author | Tristan Gingold <gingold@adacore.com> | 2009-12-03 14:14:03 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2009-12-03 14:14:03 +0000 |
commit | ef17cb22d068776deb20642e461f1c90e5dd3bf3 (patch) | |
tree | 3ca7d8915f22cbf41d3a38b084837325da3eb86b /bfd/mach-o.c | |
parent | f9f0e73285704b47d65e73890b8fb63dc7139460 (diff) | |
download | gdb-ef17cb22d068776deb20642e461f1c90e5dd3bf3.zip gdb-ef17cb22d068776deb20642e461f1c90e5dd3bf3.tar.gz gdb-ef17cb22d068776deb20642e461f1c90e5dd3bf3.tar.bz2 |
2009-12-03 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_make_bfd_section): Force debug flags for
all sections of the __DWARF segment.
Diffstat (limited to 'bfd/mach-o.c')
-rw-r--r-- | bfd/mach-o.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/mach-o.c b/bfd/mach-o.c index 641fd9b..766fb3d 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -1480,8 +1480,13 @@ bfd_mach_o_make_bfd_section (bfd *abfd, bfd_mach_o_section *section, if (sname == NULL) return NULL; - if (section->flags & BFD_MACH_O_S_ATTR_DEBUG) - flags = SEC_HAS_CONTENTS | SEC_DEBUGGING; + if ((section->flags & BFD_MACH_O_S_ATTR_DEBUG) + || !strcmp (section->segname, "__DWARF")) + { + /* Force flags for dwarf sections. This looks weird but dsym files + have no flags for them and this is important for gdb. */ + flags = SEC_HAS_CONTENTS | SEC_DEBUGGING; + } else { flags = SEC_ALLOC; |