Blame SOURCES/gdb-6.3-ia64-gcore-page0-20050421.patch

01917d
Index: gdb-7.5.50.20130118/gdb/gcore.c
01917d
===================================================================
01917d
--- gdb-7.5.50.20130118.orig/gdb/gcore.c	2013-01-18 23:50:56.698573186 +0100
01917d
+++ gdb-7.5.50.20130118/gdb/gcore.c	2013-01-18 23:52:29.636705040 +0100
01917d
@@ -549,8 +549,14 @@ gcore_copy_callback (bfd *obfd, asection
01917d
       if (size > total_size)
01917d
 	size = total_size;
01917d
 
01917d
+      /* Warn if read error occurs except if we were trying to read the
01917d
+	 first page for ia64.  The first page is marked readable, but it cannot
01917d
+	 be read.  */
01917d
       if (target_read_memory (bfd_section_vma (obfd, osec) + offset,
01917d
-			      memhunk, size) != 0)
01917d
+			      memhunk, size) != 0
01917d
+	  && (strcmp (gdbarch_bfd_arch_info (target_gdbarch ())->arch_name,
01917d
+		      "ia64")
01917d
+	      || bfd_section_vma (obfd, osec) != 0))
01917d
 	{
01917d
 	  warning (_("Memory read failed for corefile "
01917d
 		     "section, %s bytes at %s."),