-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sh: Share the ELF dump_task interfaces.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
- Loading branch information
Paul Mundt
committed
Jan 28, 2008
1 parent
a7aa92d
commit e7e0a4b
Showing
4 changed files
with
33 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include <linux/elfcore.h> | ||
#include <linux/sched.h> | ||
|
||
/* | ||
* Capture the user space registers if the task is not running (in user space) | ||
*/ | ||
int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) | ||
{ | ||
struct pt_regs ptregs; | ||
|
||
ptregs = *task_pt_regs(tsk); | ||
elf_core_copy_regs(regs, &ptregs); | ||
|
||
return 1; | ||
} | ||
|
||
int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpu) | ||
{ | ||
int fpvalid = 0; | ||
|
||
#if defined(CONFIG_SH_FPU) | ||
fpvalid = !!tsk_used_math(tsk); | ||
if (fpvalid) { | ||
unlazy_fpu(tsk, task_pt_regs(tsk)); | ||
memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu)); | ||
} | ||
#endif | ||
|
||
return fpvalid; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters