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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [include/] [asm-mips/] [ptrace.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/*
2
 * linux/include/asm-mips/ptrace.h
3
 *
4
 * This file is subject to the terms and conditions of the GNU General Public
5
 * License.  See the file "COPYING" in the main directory of this archive
6
 * for more details.
7
 *
8
 * Copyright (C) 1994, 1995 by Waldorf GMBH
9
 * written by Ralf Baechle
10
 *
11
 * Machine dependent structs and defines to help the user use
12
 * the ptrace system call.
13
 */
14
#ifndef __ASM_MIPS_PTRACE_H
15
#define __ASM_MIPS_PTRACE_H
16
 
17
/*
18
 * This struct defines the way the registers are stored on the stack during a
19
 * system call/exception. As usual the registers k0/k1 aren't being saved.
20
 */
21
struct pt_regs {
22
        /*
23
         * Pad bytes for argument save space on the stack
24
         * 20/40 Bytes for 32/64 bit code
25
         */
26
        unsigned long pad0[5];
27
 
28
        /*
29
         * saved main processor registers
30
         */
31
        long            reg1,  reg2,  reg3,  reg4,  reg5,  reg6,  reg7;
32
        long     reg8,  reg9, reg10, reg11, reg12, reg13, reg14, reg15;
33
        long    reg16, reg17, reg18, reg19, reg20, reg21, reg22, reg23;
34
        long    reg24, reg25,               reg28, reg29, reg30, reg31;
35
 
36
        /*
37
         * Saved special registers
38
         */
39
        long    lo;
40
        long    hi;
41
 
42
        /*
43
         * saved cp0 registers
44
         */
45
        unsigned long cp0_status;
46
        unsigned long cp0_epc;
47
        unsigned long cp0_cause;
48
 
49
        /*
50
         * Some goodies...
51
         */
52
        unsigned long interrupt;
53
        long orig_reg2;
54
        long pad1;
55
};
56
 
57
#ifdef __KERNEL__
58
 
59
/*
60
 * Does the process account for user or for system time?
61
 */
62
#if defined (__R4000__)
63
 
64
#define user_mode(regs) ((regs)->cp0_status & 0x10)
65
 
66
#else /* !defined (__R4000__) */
67
 
68
#define user_mode(regs) (!((regs)->cp0_status & 0x8))
69
 
70
#endif /* !defined (__R4000__) */
71
 
72
#define instruction_pointer(regs) ((regs)->cp0_epc)
73
extern void show_regs(struct pt_regs *);
74
#endif
75
 
76
#endif /* __ASM_MIPS_PTRACE_H */

powered by: WebSVN 2.1.0

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