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

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