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

18 lines
876 B
Diff
Raw Normal View History

--- gdb-6.3/gdb/gcore.c.fix 2005-04-21 15:13:23.000000000 -0400
+++ gdb-6.3/gdb/gcore.c 2005-04-21 15:16:48.000000000 -0400
@@ -462,8 +462,13 @@ gcore_copy_callback (bfd *obfd, asection
error ("Not enough memory to create corefile.");
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))
warning ("Memory read failed for corefile section, %s bytes at 0x%s\n",
paddr_d (size), paddr (bfd_section_vma (obfd, osec)));
if (!bfd_set_section_contents (obfd, osec, memhunk, 0, size))