Commit 593acef8 authored by Hirokazu Takata's avatar Hirokazu Takata Committed by Linus Torvalds

[PATCH] m32r: Fix ELF_CORE_COPY_REGS macro to generate a correct "core" file

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.
Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 99d4a6c9
......@@ -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. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment