This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed/darwin]: make __DWARF sections always debug sections


Hi,

Mach-O dsym files (the equivalent of .gnu_debuglink'ed file) have normal flags for debugging sections.
As this really confuses gdb, this patch forces the right SEC flags for these sections.

Tristan.

bfd/
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.

*** mach-o.c	9 Oct 2009 15:33:39 -0000	1.46
--- mach-o.c	3 Dec 2009 13:51:42 -0000
***************
*** 1480,1487 ****
    if (sname == NULL)
      return NULL;
  
!   if (section->flags & BFD_MACH_O_S_ATTR_DEBUG)
!     flags = SEC_HAS_CONTENTS | SEC_DEBUGGING;
    else
      {
        flags = SEC_ALLOC;
--- 1480,1492 ----
    if (sname == NULL)
      return NULL;
  
!   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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]