gdb/gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
Fabio M. Di Nitto 1cd4f3809f - Cleanup spec file to add sparc|sparcv9|sparc64.
- Add sparc specific workarounds to toolchain badness:
  - disable mmap in bdf/ via --without-mmap configure option.
  - add patch to not build mmap support on sparc for gdb/.
  - gdb code is NOT at fault, but we need a working gdb while we sort out
    the toolchain and rebuild all packages. this workaround is NOT for upstream

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2011-03-30 14:08:36 +02:00

50 lines
1.0 KiB
Diff

--- gdb-7.2.50.20110328.orig/gdb/dwarf2read.c 2011-03-30 12:52:20.395450001 +0200
+++ gdb-7.2.50.20110328/gdb/dwarf2read.c 2011-03-30 13:41:55.485450006 +0200
@@ -66,12 +66,14 @@
#ifdef HAVE_ZLIB_H
#include <zlib.h>
#endif
+#ifndef __sparc__
#ifdef HAVE_MMAP
#include <sys/mman.h>
#ifndef MAP_FAILED
#define MAP_FAILED ((void *) -1)
#endif
#endif
+#endif
typedef struct symbol *symbolp;
DEF_VEC_P (symbolp);
@@ -1563,6 +1565,7 @@
}
}
+#ifndef __sparc__
#ifdef HAVE_MMAP
if (pagesize == 0)
pagesize = getpagesize ();
@@ -1589,6 +1592,7 @@
}
}
#endif
+#endif
/* If we get here, we are a normal, not-compressed section. */
info->buffer = buf
@@ -15439,6 +15443,7 @@
{
if (info->was_mmapped)
{
+#ifndef __sparc__
#ifdef HAVE_MMAP
intptr_t begin = (intptr_t) info->buffer;
intptr_t map_begin = begin & ~(pagesize - 1);
@@ -15449,6 +15454,7 @@
/* Without HAVE_MMAP, we should never be here to begin with. */
gdb_assert_not_reached ("no mmap support");
#endif
+#endif
}
}