2006-07-11 06:33:02 +00:00
|
|
|
Index: gdb-6.5/gdb/gcore.c
|
|
|
|
===================================================================
|
|
|
|
--- gdb-6.5.orig/gdb/gcore.c 2005-12-17 20:33:59.000000000 -0200
|
|
|
|
+++ gdb-6.5/gdb/gcore.c 2006-07-07 02:41:33.000000000 -0300
|
2005-04-21 20:10:16 +00:00
|
|
|
@@ -462,8 +462,13 @@ gcore_copy_callback (bfd *obfd, asection
|
2006-07-11 06:33:02 +00:00
|
|
|
error (_("Not enough memory to create corefile."));
|
2005-04-21 20:10:16 +00:00
|
|
|
old_chain = make_cleanup (xfree, memhunk);
|
|
|
|
|
|
|
|
+ /* 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),
|
|
|
|
- memhunk, size) != 0)
|
|
|
|
+ memhunk, size) != 0
|
|
|
|
+ && (strcmp (TARGET_ARCHITECTURE->arch_name, "ia64")
|
|
|
|
+ || bfd_section_vma (obfd, osec) != 0))
|
2006-07-11 06:33:02 +00:00
|
|
|
warning (_("Memory read failed for corefile section, %s bytes at 0x%s."),
|
2005-04-21 20:10:16 +00:00
|
|
|
paddr_d (size), paddr (bfd_section_vma (obfd, osec)));
|
|
|
|
if (!bfd_set_section_contents (obfd, osec, memhunk, 0, size))
|