Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ptrace.h File Reference
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  sys_pt_regs_s
 
struct  sys_pt_regs
 

Macros

#define PPC_REG   unsigned long
 
#define NUM_REGS   (sizeof(struct sys_pt_regs_s) / sizeof(PPC_REG))
 
#define UM_MAX_REG   (PT_FPR0)
 
#define UM_MAX_REG_OFFSET   (UM_MAX_REG * sizeof(PPC_REG))
 
#define EMPTY_REGS   { { [ 0 ... NUM_REGS - 1] = 0 } }
 
#define UM_REG(r, n)   ((r)->regs[n])
 
#define UM_SYSCALL_RET(r)   UM_REG(r, PT_R3)
 
#define UM_SP(r)   UM_REG(r, PT_R1)
 
#define UM_IP(r)   UM_REG(r, PT_NIP)
 
#define UM_ELF_ZERO(r)   UM_REG(r, PT_FPSCR)
 
#define UM_SYSCALL_NR(r)   UM_REG(r, PT_R0)
 
#define UM_SYSCALL_ARG1(r)   UM_REG(r, PT_ORIG_R3)
 
#define UM_SYSCALL_ARG2(r)   UM_REG(r, PT_R4)
 
#define UM_SYSCALL_ARG3(r)   UM_REG(r, PT_R5)
 
#define UM_SYSCALL_ARG4(r)   UM_REG(r, PT_R6)
 
#define UM_SYSCALL_ARG5(r)   UM_REG(r, PT_R7)
 
#define UM_SYSCALL_ARG6(r)   UM_REG(r, PT_R8)
 
#define UM_SYSCALL_NR_OFFSET   (PT_R0 * sizeof(PPC_REG))
 
#define UM_SYSCALL_RET_OFFSET   (PT_R3 * sizeof(PPC_REG))
 
#define UM_SYSCALL_ARG1_OFFSET   (PT_R3 * sizeof(PPC_REG))
 
#define UM_SYSCALL_ARG2_OFFSET   (PT_R4 * sizeof(PPC_REG))
 
#define UM_SYSCALL_ARG3_OFFSET   (PT_R5 * sizeof(PPC_REG))
 
#define UM_SYSCALL_ARG4_OFFSET   (PT_R6 * sizeof(PPC_REG))
 
#define UM_SYSCALL_ARG5_OFFSET   (PT_R7 * sizeof(PPC_REG))
 
#define UM_SYSCALL_ARG6_OFFSET   (PT_R8 * sizeof(PPC_REG))
 
#define UM_SP_OFFSET   (PT_R1 * sizeof(PPC_REG))
 
#define UM_IP_OFFSET   (PT_NIP * sizeof(PPC_REG))
 
#define UM_ELF_ZERO_OFFSET   (PT_R3 * sizeof(PPC_REG))
 
#define UM_SET_SYSCALL_RETURN(_regs, result)
 
#define UM_FIX_EXEC_STACK(sp)   shove_aux_table(sp);
 

Functions

void shove_aux_table (unsigned long sp)
 

Macro Definition Documentation

#define EMPTY_REGS   { { [ 0 ... NUM_REGS - 1] = 0 } }

Definition at line 43 of file ptrace.h.

#define NUM_REGS   (sizeof(struct sys_pt_regs_s) / sizeof(PPC_REG))

Definition at line 34 of file ptrace.h.

#define PPC_REG   unsigned long

Definition at line 15 of file ptrace.h.

#define UM_ELF_ZERO (   r)    UM_REG(r, PT_FPSCR)

Definition at line 50 of file ptrace.h.

#define UM_ELF_ZERO_OFFSET   (PT_R3 * sizeof(PPC_REG))

Definition at line 69 of file ptrace.h.

#define UM_FIX_EXEC_STACK (   sp)    shove_aux_table(sp);

Definition at line 82 of file ptrace.h.

#define UM_IP (   r)    UM_REG(r, PT_NIP)

Definition at line 49 of file ptrace.h.

#define UM_IP_OFFSET   (PT_NIP * sizeof(PPC_REG))

Definition at line 68 of file ptrace.h.

#define UM_MAX_REG   (PT_FPR0)

Definition at line 40 of file ptrace.h.

#define UM_MAX_REG_OFFSET   (UM_MAX_REG * sizeof(PPC_REG))

Definition at line 41 of file ptrace.h.

#define UM_REG (   r,
  n 
)    ((r)->regs[n])

Definition at line 45 of file ptrace.h.

#define UM_SET_SYSCALL_RETURN (   _regs,
  result 
)
Value:
do { \
if (result < 0) { \
(_regs)->regs[PT_CCR] |= 0x10000000; \
UM_SYSCALL_RET((_regs)) = -result; \
} else { \
UM_SYSCALL_RET((_regs)) = result; \
} \
} while(0)

Definition at line 71 of file ptrace.h.

#define UM_SP (   r)    UM_REG(r, PT_R1)

Definition at line 48 of file ptrace.h.

#define UM_SP_OFFSET   (PT_R1 * sizeof(PPC_REG))

Definition at line 67 of file ptrace.h.

#define UM_SYSCALL_ARG1 (   r)    UM_REG(r, PT_ORIG_R3)

Definition at line 52 of file ptrace.h.

#define UM_SYSCALL_ARG1_OFFSET   (PT_R3 * sizeof(PPC_REG))

Definition at line 61 of file ptrace.h.

#define UM_SYSCALL_ARG2 (   r)    UM_REG(r, PT_R4)

Definition at line 53 of file ptrace.h.

#define UM_SYSCALL_ARG2_OFFSET   (PT_R4 * sizeof(PPC_REG))

Definition at line 62 of file ptrace.h.

#define UM_SYSCALL_ARG3 (   r)    UM_REG(r, PT_R5)

Definition at line 54 of file ptrace.h.

#define UM_SYSCALL_ARG3_OFFSET   (PT_R5 * sizeof(PPC_REG))

Definition at line 63 of file ptrace.h.

#define UM_SYSCALL_ARG4 (   r)    UM_REG(r, PT_R6)

Definition at line 55 of file ptrace.h.

#define UM_SYSCALL_ARG4_OFFSET   (PT_R6 * sizeof(PPC_REG))

Definition at line 64 of file ptrace.h.

#define UM_SYSCALL_ARG5 (   r)    UM_REG(r, PT_R7)

Definition at line 56 of file ptrace.h.

#define UM_SYSCALL_ARG5_OFFSET   (PT_R7 * sizeof(PPC_REG))

Definition at line 65 of file ptrace.h.

#define UM_SYSCALL_ARG6 (   r)    UM_REG(r, PT_R8)

Definition at line 57 of file ptrace.h.

#define UM_SYSCALL_ARG6_OFFSET   (PT_R8 * sizeof(PPC_REG))

Definition at line 66 of file ptrace.h.

#define UM_SYSCALL_NR (   r)    UM_REG(r, PT_R0)

Definition at line 51 of file ptrace.h.

#define UM_SYSCALL_NR_OFFSET   (PT_R0 * sizeof(PPC_REG))

Definition at line 59 of file ptrace.h.

#define UM_SYSCALL_RET (   r)    UM_REG(r, PT_R3)

Definition at line 47 of file ptrace.h.

#define UM_SYSCALL_RET_OFFSET   (PT_R3 * sizeof(PPC_REG))

Definition at line 60 of file ptrace.h.

Function Documentation

void shove_aux_table ( unsigned long  sp)

Definition at line 12 of file miscthings.c.