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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-or32/] [ptrace.h] - Diff between revs 1574 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 1574 Rev 1765
#ifndef _OR32_PTRACE_H
#ifndef _OR32_PTRACE_H
#define _OR32_PTRACE_H
#define _OR32_PTRACE_H
 
 
#include <asm/spr_defs.h>
#include <asm/spr_defs.h>
/*
/*
 * This struct defines the way the registers are stored on the
 * This struct defines the way the registers are stored on the
 * kernel stack during a system call or other kernel entry.
 * kernel stack during a system call or other kernel entry.
 *
 *
 * this should only contain volatile regs
 * this should only contain volatile regs
 * since we can keep non-volatile in the thread_struct
 * since we can keep non-volatile in the thread_struct
 * should set this up when only volatiles are saved
 * should set this up when only volatiles are saved
 * by intr code.
 * by intr code.
 *
 *
 * Since this is going on the stack, *CARE MUST BE TAKEN* to insure
 * Since this is going on the stack, *CARE MUST BE TAKEN* to insure
 * that the overall structure is a multiple of 16 bytes in length.
 * that the overall structure is a multiple of 16 bytes in length.
 *
 *
 * Note that the offsets of the fields in this struct correspond with
 * Note that the offsets of the fields in this struct correspond with
 * the values below.
 * the values below.
 */
 */
 
 
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLY__
 
 
struct pt_regs {
struct pt_regs {
        long  pc;
        long  pc;
        long  sr;
        long  sr;
        long  sp;
        long  sp;
        long  gprs[30];
        long  gprs[30];
        long  orig_gpr3;  /* Used for restarting system calls */
        long  orig_gpr3;  /* Used for restarting system calls */
        long  result;     /* Result of a system call */
        long  result;     /* Result of a system call */
        long  syscallno;  /* Syscall no. (used by strace) */
        long  syscallno;  /* Syscall no. (used by strace) */
};
};
#endif /* __ASSEMBLY__ */
#endif /* __ASSEMBLY__ */
 
 
#ifdef __KERNEL__
#ifdef __KERNEL__
#define STACK_FRAME_OVERHEAD  0  /* size of minimum stack frame */
#define STACK_FRAME_OVERHEAD  0  /* size of minimum stack frame */
 
 
/* Size of stack frame allocated when calling signal handler. */
/* Size of stack frame allocated when calling signal handler. */
#define __SIGNAL_FRAMESIZE  64
#define __SIGNAL_FRAMESIZE  64
 
 
#define instruction_pointer(regs) ((regs)->pc)
#define instruction_pointer(regs) ((regs)->pc)
#define user_mode(regs) (((regs)->sr & SPR_SR_SM) == 0)
#define user_mode(regs) (((regs)->sr & SPR_SR_SM) == 0)
 
 
#endif /* __KERNEL__ */
#endif /* __KERNEL__ */
 
 
/*
/*
 * Offsets used by 'ptrace' system call interface.
 * Offsets used by 'ptrace' system call interface.
 */
 */
#define PC        0
#define PC        0
#define SR        4
#define SR        4
#define SP        8
#define SP        8
#define GPR2      12
#define GPR2      12
#define GPR3      16
#define GPR3      16
#define GPR4      20
#define GPR4      20
#define GPR5      24
#define GPR5      24
#define GPR6      28
#define GPR6      28
#define GPR7      32
#define GPR7      32
#define GPR8      36
#define GPR8      36
#define GPR9      40
#define GPR9      40
#define GPR10     44
#define GPR10     44
#define GPR11     48
#define GPR11     48
#define GPR12     52
#define GPR12     52
#define GPR13     56
#define GPR13     56
#define GPR14     60
#define GPR14     60
#define GPR15     64
#define GPR15     64
#define GPR16     68
#define GPR16     68
#define GPR17     72
#define GPR17     72
#define GPR18     76
#define GPR18     76
#define GPR19     80
#define GPR19     80
#define GPR20     84
#define GPR20     84
#define GPR21     88
#define GPR21     88
#define GPR22     92
#define GPR22     92
#define GPR23     96
#define GPR23     96
#define GPR24     100
#define GPR24     100
#define GPR25     104
#define GPR25     104
#define GPR26     108
#define GPR26     108
#define GPR27     112
#define GPR27     112
#define GPR28     116
#define GPR28     116
#define GPR29     120
#define GPR29     120
#define GPR30     124
#define GPR30     124
#define GPR31     128
#define GPR31     128
#define ORIG_GPR3 132
#define ORIG_GPR3 132
#define RESULT    136
#define RESULT    136
#define SYSCALLNO 140
#define SYSCALLNO 140
 
 
#endif /* _OR32_PTRACE_H */
#endif /* _OR32_PTRACE_H */
 
 

powered by: WebSVN 2.1.0

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