[PATCH 2.6.10-rc1] [m32r] Fix ELF_CORE_COPY_REGS macro to generatea correct "core" file

From: Hirokazu Takata
Date: Fri Oct 29 2004 - 07:57:08 EST


Hi,

Here is a patch for include/asm-m32r/elf.h.

This patch fixes ELF_CORE_COPY_REGS() macro in order to dump
register information into "core" files correctly,
because both parameters pr_reg and regs are passed as pointers
to "elf_gregset_t" and "struct pt_regs", respectively.

I've tested it by using a native m32r GNU debugger.

Thanks.

Signed-off-by: Hirokazu Takata <takata@xxxxxxxxxxxxxx>
---

include/asm-m32r/elf.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -ruNp a/include/asm-m32r/elf.h b/include/asm-m32r/elf.h
--- a/include/asm-m32r/elf.h 2004-10-19 06:54:37.000000000 +0900
+++ b/include/asm-m32r/elf.h 2004-10-29 15:18:48.000000000 +0900
@@ -154,7 +154,7 @@ typedef elf_fpreg_t elf_fpregset_t;
now struct_user_regs, they are different) */

#define ELF_CORE_COPY_REGS(pr_reg, regs) \
- memcpy((char *)&pr_reg, (char *)&regs, sizeof (struct pt_regs));
+ memcpy((char *)pr_reg, (char *)regs, sizeof (struct pt_regs));

/* This yields a mask that user programs can use to figure out what
instruction set this CPU supports. */

--
Hirokazu Takata <takata@xxxxxxxxxxxxxx>
Linux/M32R Project: http://www.linux-m32r.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/