Blame SOURCES/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch

7a6771
Index: gdb-7.9.90.20150709/gdb/gdb_bfd.c
7a6771
===================================================================
7a6771
--- gdb-7.9.90.20150709.orig/gdb/gdb_bfd.c	2015-07-09 18:23:59.344017882 +0200
7a6771
+++ gdb-7.9.90.20150709/gdb/gdb_bfd.c	2015-07-09 18:24:06.986083071 +0200
7a6771
@@ -24,12 +24,14 @@
7a6771
 #include "hashtab.h"
7a6771
 #include "filestuff.h"
7a6771
 #include "vec.h"
7a6771
+#ifndef __sparc__
7a6771
 #ifdef HAVE_MMAP
7a6771
 #include <sys/mman.h>
7a6771
 #ifndef MAP_FAILED
7a6771
 #define MAP_FAILED ((void *) -1)
7a6771
 #endif
7a6771
 #endif
7a6771
+#endif
7a6771
 #include "target.h"
7a6771
 #include "gdb/fileio.h"
7a6771
 #include "inferior.h"
7a6771
@@ -397,6 +399,7 @@ free_one_bfd_section (bfd *abfd, asectio
7a6771
 
7a6771
   if (sect != NULL && sect->data != NULL)
7a6771
     {
7a6771
+#ifndef __sparc__
7a6771
 #ifdef HAVE_MMAP
7a6771
       if (sect->map_addr != NULL)
7a6771
 	{
7a6771
@@ -407,6 +410,7 @@ free_one_bfd_section (bfd *abfd, asectio
7a6771
 	}
7a6771
       else
7a6771
 #endif
7a6771
+#endif
7a6771
 	xfree (sect->data);
7a6771
     }
7a6771
 }
7a6771
@@ -558,6 +562,7 @@ gdb_bfd_map_section (asection *sectp, bf
7a6771
   if (descriptor->data != NULL)
7a6771
     goto done;
7a6771
 
7a6771
+#ifndef __sparc__
7a6771
 #ifdef HAVE_MMAP
7a6771
   if (!bfd_is_section_compressed (abfd, sectp))
7a6771
     {
7a6771
@@ -592,6 +597,7 @@ gdb_bfd_map_section (asection *sectp, bf
7a6771
 	}
7a6771
     }
7a6771
 #endif /* HAVE_MMAP */
7a6771
+#endif
7a6771
 
7a6771
   /* Handle compressed sections, or ordinary uncompressed sections in
7a6771
      the no-mmap case.  */