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

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