diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/cris/kernel/ptrace.c | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/arch/cris/kernel/ptrace.c b/arch/cris/kernel/ptrace.c index e85a2fdd9acf..2b6363cbe985 100644 --- a/arch/cris/kernel/ptrace.c +++ b/arch/cris/kernel/ptrace.c | |||
@@ -8,6 +8,12 @@ | |||
8 | * Authors: Bjorn Wesen | 8 | * Authors: Bjorn Wesen |
9 | * | 9 | * |
10 | * $Log: ptrace.c,v $ | 10 | * $Log: ptrace.c,v $ |
11 | * Revision 1.10 2004/09/22 11:50:01 orjanf | ||
12 | * * Moved get_reg/put_reg to arch-specific files. | ||
13 | * * Added functions to access debug registers (CRISv32). | ||
14 | * * Added support for PTRACE_SINGLESTEP (CRISv32). | ||
15 | * * Added S flag to CCS_MASK (CRISv32). | ||
16 | * | ||
11 | * Revision 1.9 2003/07/04 12:56:11 tobiasa | 17 | * Revision 1.9 2003/07/04 12:56:11 tobiasa |
12 | * Moved arch-specific code to arch-specific files. | 18 | * Moved arch-specific code to arch-specific files. |
13 | * | 19 | * |
@@ -72,37 +78,6 @@ | |||
72 | #include <asm/system.h> | 78 | #include <asm/system.h> |
73 | #include <asm/processor.h> | 79 | #include <asm/processor.h> |
74 | 80 | ||
75 | /* | ||
76 | * Get contents of register REGNO in task TASK. | ||
77 | */ | ||
78 | inline long get_reg(struct task_struct *task, unsigned int regno) | ||
79 | { | ||
80 | /* USP is a special case, it's not in the pt_regs struct but | ||
81 | * in the tasks thread struct | ||
82 | */ | ||
83 | |||
84 | if (regno == PT_USP) | ||
85 | return task->thread.usp; | ||
86 | else if (regno < PT_MAX) | ||
87 | return ((unsigned long *)user_regs(task->thread_info))[regno]; | ||
88 | else | ||
89 | return 0; | ||
90 | } | ||
91 | |||
92 | /* | ||
93 | * Write contents of register REGNO in task TASK. | ||
94 | */ | ||
95 | inline int put_reg(struct task_struct *task, unsigned int regno, | ||
96 | unsigned long data) | ||
97 | { | ||
98 | if (regno == PT_USP) | ||
99 | task->thread.usp = data; | ||
100 | else if (regno < PT_MAX) | ||
101 | ((unsigned long *)user_regs(task->thread_info))[regno] = data; | ||
102 | else | ||
103 | return -1; | ||
104 | return 0; | ||
105 | } | ||
106 | 81 | ||
107 | /* notification of userspace execution resumption | 82 | /* notification of userspace execution resumption |
108 | * - triggered by current->work.notify_resume | 83 | * - triggered by current->work.notify_resume |