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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [include/] [asm/] [ptrace.h] - Blame information for rev 1778

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

Line No. Rev Author Line
1 199 simons
#ifndef _OR1K_PTRACE_H
2
#define _OR1K_PTRACE_H
3
 
4
#include <linux/config.h> /* get configuration macros */
5
 
6
#define STATE 0
7
#define COUNTER 4
8
#define SIGNAL 12
9
#define BLOCKED 16
10
#define TASK_FLAGS 20
11
#define TSS 528
12
#define TSS_PC 0
13
#define TSS_SR 4
14
#define TSS_KSP 8
15
#define TSS_USP 12
16
#define TSS_REGS 16
17
 
18
#define PC 0
19
#define SR 4
20
#define SP 8
21
#define GPR2 12
22
#define GPR3 16
23
#define GPR4 20
24
#define GPR5 24
25
#define GPR6 28
26
#define GPR7 32
27
#define GPR8 36
28
#define GPR9 40
29
#define GPR10 44
30
#define GPR11 48
31
#define GPR12 52
32
#define GPR13 56
33
#define GPR14 60
34
#define GPR15 64
35
#define GPR16 68
36
#define GPR17 72
37
#define GPR18 76
38
#define GPR19 80
39
#define GPR20 84
40
#define GPR21 88
41
#define GPR22 92
42
#define GPR23 96
43
#define GPR24 100
44
#define GPR25 104
45
#define GPR26 108
46
#define GPR27 112
47
#define GPR28 116
48
#define GPR29 120
49
#define GPR30 124
50
#define GPR31 128
51
 
52
#define INT_FRAME_SIZE 132
53
 
54
#ifndef __ASSEMBLY__
55
 
56
/* this struct defines the way the registers are stored on the
57
   stack during a system call. */
58
 
59
struct pt_regs {
60
  long     pc;
61
  long     sr;
62
  long     sp;
63
  long     gprs[30];
64
};
65
 
66
/*
67
 * This is the extended stack used by signal handlers and the context
68
 * switcher: it's pushed after the normal "struct pt_regs".
69
 */
70
struct switch_stack {
71
        unsigned long  d6;
72
        unsigned long  d7;
73
        unsigned long  a2;
74
        unsigned long  a3;
75
        unsigned long  a4;
76
        unsigned long  a5;
77
        unsigned long  a6;
78
        unsigned long  retpc;
79
};
80
 
81
#ifdef __KERNEL__
82
 
83
#ifndef PS_S
84
#define PS_S  (0x2000)
85
#define PS_M  (0x1000)
86
#endif
87
 
88
#define user_mode(regs) (!((regs)->sr & SPR_SR_SUPV))
89
#define instruction_pointer(regs) ((regs)->pc)
90
extern void show_regs(struct pt_regs *);
91
#endif /* __KERNEL__ */
92
#endif /* __ASSEMBLY__ */
93
#endif /* _OR1K_PTRACE_H */

powered by: WebSVN 2.1.0

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