gdb/gdb-6.3-ia64-gcore-page0-20050421.patch
Jan Kratochvil e5611bfae3 - Upgrade to the FSF GDB gdb-6.8.50 snapshot: 6.8.50.20090803
- archer-jankratochvil-fedora12 commit:
    0222cb1f4ddd1eda32965e464cb60b1e44e110b2
2009-08-04 05:37:29 +00:00

21 lines
899 B
Diff

Index: gdb-6.8.50.20090802/gdb/gcore.c
===================================================================
--- gdb-6.8.50.20090802.orig/gdb/gcore.c 2009-08-03 12:27:55.000000000 +0200
+++ gdb-6.8.50.20090802/gdb/gcore.c 2009-08-03 12:28:56.000000000 +0200
@@ -479,8 +479,14 @@ gcore_copy_callback (bfd *obfd, asection
if (size > total_size)
size = total_size;
+ /* Warn if read error occurs except if we were trying to read the
+ first page for ia64. The first page is marked readable, but it cannot
+ be read. */
if (target_read_memory (bfd_section_vma (obfd, osec) + offset,
- memhunk, size) != 0)
+ memhunk, size) != 0
+ && (strcmp (gdbarch_bfd_arch_info (target_gdbarch)->arch_name,
+ "ia64")
+ || bfd_section_vma (obfd, osec) != 0))
{
warning (_("Memory read failed for corefile section, %s bytes at %s."),
plongest (size),