summaryrefslogtreecommitdiff
path: root/bfd/mach-o.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2009-12-03 14:14:02 +0000
committerTristan Gingold <gingold@adacore.com>2009-12-03 14:14:02 +0000
commitafcf4b3b52e4f176adf703654c23521339664c7a (patch)
treec6c2123617a11ec2837fd79f9a1dd8ce0dc0b1b4 /bfd/mach-o.c
parent5a6141003c1f04b7838ee99530f89055af9796ca (diff)
downloadgdb-afcf4b3b52e4f176adf703654c23521339664c7a.tar.gz
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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index 641fd9bd443..766fb3d76d9 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;