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

Subversion Repositories or1k

[/] [or1k/] [tags/] [LINUX_2_4_26_OR32/] [linux/] [linux-2.4/] [include/] [asm-or32/] [ptrace.h] - Blame information for rev 1780

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
#ifndef _OR32_PTRACE_H
2
#define _OR32_PTRACE_H
3
 
4
#include <asm/spr_defs.h>
5
/*
6
 * This struct defines the way the registers are stored on the
7
 * kernel stack during a system call or other kernel entry.
8
 *
9
 * this should only contain volatile regs
10
 * since we can keep non-volatile in the thread_struct
11
 * should set this up when only volatiles are saved
12
 * by intr code.
13
 *
14
 * Since this is going on the stack, *CARE MUST BE TAKEN* to insure
15
 * that the overall structure is a multiple of 16 bytes in length.
16
 *
17
 * Note that the offsets of the fields in this struct correspond with
18
 * the values below.
19
 */
20
 
21
#ifndef __ASSEMBLY__
22
 
23
struct pt_regs {
24
        long  pc;
25
        long  sr;
26
        long  sp;
27
        long  gprs[30];
28
        long  orig_gpr3;  /* Used for restarting system calls */
29
        long  result;     /* Result of a system call */
30
        long  dummy;
31
};
32
#endif /* __ASSEMBLY__ */
33
 
34
#ifdef __KERNEL__
35
#define STACK_FRAME_OVERHEAD  0  /* size of minimum stack frame */
36
 
37
/* Size of stack frame allocated when calling signal handler. */
38
#define __SIGNAL_FRAMESIZE  64
39
 
40
#define instruction_pointer(regs) ((regs)->pc)
41
#define user_mode(regs) (((regs)->sr & SPR_SR_SM) == 0)
42
 
43
#endif /* __KERNEL__ */
44
 
45
/*
46
 * Offsets used by 'ptrace' system call interface.
47
 */
48
#define PC        0
49
#define SR        4
50
#define SP        8
51
#define GPR2      12
52
#define GPR3      16
53
#define GPR4      20
54
#define GPR5      24
55
#define GPR6      28
56
#define GPR7      32
57
#define GPR8      36
58
#define GPR9      40
59
#define GPR10     44
60
#define GPR11     48
61
#define GPR12     52
62
#define GPR13     56
63
#define GPR14     60
64
#define GPR15     64
65
#define GPR16     68
66
#define GPR17     72
67
#define GPR18     76
68
#define GPR19     80
69
#define GPR20     84
70
#define GPR21     88
71
#define GPR22     92
72
#define GPR23     96
73
#define GPR24     100
74
#define GPR25     104
75
#define GPR26     108
76
#define GPR27     112
77
#define GPR28     116
78
#define GPR29     120
79
#define GPR30     124
80
#define GPR31     128
81
#define ORIG_GPR3 132
82
#define RESULT    136
83
#define DUMMY     140
84
 
85
#endif /* _OR32_PTRACE_H */

powered by: WebSVN 2.1.0

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