OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [i960/] [kernel/] [ptrace.c] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1623 jcastillo
/*
2
 *  linux/arch/i960/kernel/ptrace.c
3
 *
4
 *  Copyright (C) 1998  Keith Adams     <kma@cse.ogi.edu>
5
 *                      Oregon Graduate Institute
6
 *
7
 *  Based on:
8
 *
9
 *  linux/arch/m68k/kernel/ptrace
10
 *
11
 *  Copyright (C) 1994 by Hamish Macdonald
12
 *  Taken from linux/kernel/ptrace.c and modified for M680x0.
13
 *  linux/kernel/ptrace.c is by Ross Biro 1/23/92, edited by Linus Torvalds
14
 *
15
 * This file is subject to the terms and conditions of the GNU General
16
 * Public License.  See the file COPYING in the main directory of
17
 * this archive for more details.
18
 */
19
 
20
/*
21
 * XXX: unimplemented
22
 */
23
#include <linux/kernel.h>
24
#include <linux/sched.h>
25
#include <linux/string.h>
26
 
27
#include <linux/mm.h>
28
#include <linux/errno.h>
29
#include <linux/ptrace.h>
30
#include <linux/user.h>
31
 
32
#include <asm/segment.h>
33
#include <asm/page.h>
34
#include <asm/pgtable.h>
35
#include <asm/system.h>
36
 
37
/* change a pid into a task struct. */
38
static inline struct task_struct * get_task(int pid)
39
{
40
        int i;
41
 
42
        for (i = 1; i < NR_TASKS; i++) {
43
                if (task[i] != NULL && (task[i]->pid == pid))
44
                        return task[i];
45
        }
46
        return NULL;
47
}
48
 
49
/*
50
 * Get contents of register REGNO in task TASK.
51
 */
52
static inline long get_reg(struct task_struct *task, int regno)
53
{
54
        return -1;
55
}
56
 
57
/*
58
 * Write contents of register REGNO in task TASK.
59
 */
60
static inline int put_reg(struct task_struct *task, int regno,
61
                          unsigned long data)
62
{
63
        return -1;
64
}
65
 
66
inline
67
static unsigned long get_long(struct task_struct * tsk,
68
        struct vm_area_struct * vma, unsigned long addr)
69
{
70
        return *(unsigned long*)addr;
71
}
72
 
73
inline
74
static void put_long(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long addr,
75
        unsigned long data)
76
{
77
        *(unsigned long*)addr = data;
78
}
79
 
80
 
81
inline
82
static int read_long(struct task_struct * tsk, unsigned long addr,
83
        unsigned long * result)
84
{
85
        *result = *(unsigned long *)addr;
86
        return 0;
87
}
88
 
89
inline
90
static int write_long(struct task_struct * tsk, unsigned long addr,
91
        unsigned long data)
92
{
93
        *(unsigned long *)addr = data;
94
        return 0;
95
}
96
 
97
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
98
{
99
        return -1;
100
}
101
 
102
asmlinkage void syscall_trace(void)
103
{
104
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.