mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix the multithread program core thread message error
@ 2009-06-30  9:12 Hui Zhu
  2009-07-01  0:54 ` Amerigo Wang
  0 siblings, 1 reply; 11+ messages in thread
From: Hui Zhu @ 2009-06-30  9:12 UTC (permalink / raw)
  To: linux-kernel

Fix the multithread program core thread message error.
The thread message of core file is generated in
elf_dump_thread_status.  The register values is set by
elf_core_copy_task_regs in this function.
static inline int elf_core_copy_task_regs(struct task_struct *t,
					   elf_gregset_t* elfregs)
{

	return ELF_CORE_COPY_TASK_REGS(t, elfregs);
	return 0;
}
If a arch doesn't define ELF_CORE_COPY_TASK_REGS, This function will do
nothing.  Then the core file will not have the register message of
thread.
So add elf_core_copy_regs to set regiser values if
ELF_CORE_COPY_TASK_REGS doesn't define.
---
 elfcore.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index 7605c5e..03ec167 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -125,6 +125,8 @@ static inline int elf_core_copy_task_regs(struct
task_struct *t, elf_gregset_t*
 #ifdef ELF_CORE_COPY_TASK_REGS

        return ELF_CORE_COPY_TASK_REGS(t, elfregs);
+#else
+       elf_core_copy_regs(elfregs, task_pt_regs(t));
 #endif
        return 0;
 }

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-07-03  9:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-30  9:12 [PATCH] Fix the multithread program core thread message error Hui Zhu
2009-07-01  0:54 ` Amerigo Wang
2009-07-01  3:27   ` Hui Zhu
2009-07-01  3:29     ` Hui Zhu
2009-07-01  4:51     ` Amerigo Wang
2009-07-01  6:21       ` Hui Zhu
2009-07-01  7:20         ` Amerigo Wang
2009-07-01  8:16           ` Hui Zhu
2009-07-01 19:05         ` Andrew Morton
2009-07-01 19:19           ` Bill Gatliff
2009-07-03  9:48           ` Amerigo Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®