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

Go to the source code of this file.

Data Structures

struct  pt_regs
 
struct  per_regs
 
struct  per_event
 
struct  per_struct_kernel
 

Macros

#define PER_EVENT_MASK   0xEB000000UL
 
#define PER_EVENT_BRANCH   0x80000000UL
 
#define PER_EVENT_IFETCH   0x40000000UL
 
#define PER_EVENT_STORE   0x20000000UL
 
#define PER_EVENT_STORE_REAL   0x08000000UL
 
#define PER_EVENT_TRANSACTION_END   0x02000000UL
 
#define PER_EVENT_NULLIFICATION   0x01000000UL
 
#define PER_CONTROL_MASK   0x00e00000UL
 
#define PER_CONTROL_BRANCH_ADDRESS   0x00800000UL
 
#define PER_CONTROL_SUSPENSION   0x00400000UL
 
#define PER_CONTROL_ALTERATION   0x00200000UL
 
#define arch_has_single_step()   (1)
 
#define user_mode(regs)   (((regs)->psw.mask & PSW_MASK_PSTATE) != 0)
 
#define instruction_pointer(regs)   ((regs)->psw.addr & PSW_ADDR_INSN)
 
#define user_stack_pointer(regs)   ((regs)->gprs[15])
 
#define profile_pc(regs)   instruction_pointer(regs)
 

Functions

int regs_query_register_offset (const char *name)
 
const charregs_query_register_name (unsigned int offset)
 
unsigned long regs_get_register (struct pt_regs *regs, unsigned int offset)
 
unsigned long regs_get_kernel_stack_nth (struct pt_regs *regs, unsigned int n)
 

Variables

long psw_kernel_bits
 
long psw_user_bits
 

Macro Definition Documentation

#define arch_has_single_step ( )    (1)

Definition at line 85 of file ptrace.h.

#define instruction_pointer (   regs)    ((regs)->psw.addr & PSW_ADDR_INSN)

Definition at line 88 of file ptrace.h.

#define PER_CONTROL_ALTERATION   0x00200000UL

Definition at line 78 of file ptrace.h.

#define PER_CONTROL_BRANCH_ADDRESS   0x00800000UL

Definition at line 76 of file ptrace.h.

#define PER_CONTROL_MASK   0x00e00000UL

Definition at line 74 of file ptrace.h.

#define PER_CONTROL_SUSPENSION   0x00400000UL

Definition at line 77 of file ptrace.h.

#define PER_EVENT_BRANCH   0x80000000UL

Definition at line 67 of file ptrace.h.

#define PER_EVENT_IFETCH   0x40000000UL

Definition at line 68 of file ptrace.h.

#define PER_EVENT_MASK   0xEB000000UL

Definition at line 65 of file ptrace.h.

#define PER_EVENT_NULLIFICATION   0x01000000UL

Definition at line 72 of file ptrace.h.

#define PER_EVENT_STORE   0x20000000UL

Definition at line 69 of file ptrace.h.

#define PER_EVENT_STORE_REAL   0x08000000UL

Definition at line 70 of file ptrace.h.

#define PER_EVENT_TRANSACTION_END   0x02000000UL

Definition at line 71 of file ptrace.h.

#define profile_pc (   regs)    instruction_pointer(regs)

Definition at line 90 of file ptrace.h.

#define user_mode (   regs)    (((regs)->psw.mask & PSW_MASK_PSTATE) != 0)

Definition at line 87 of file ptrace.h.

#define user_stack_pointer (   regs)    ((regs)->gprs[15])

Definition at line 89 of file ptrace.h.

Function Documentation

unsigned long regs_get_kernel_stack_nth ( struct pt_regs regs,
unsigned int  n 
)

regs_get_kernel_stack_nth() - get Nth entry of the stack : pt_regs which contains kernel stack pointer.
: stack entry number.

regs_get_kernel_stack_nth() returns
th entry of the kernel stack which is specified by . If the
th entry is NOT in the kernel stack, this returns 0.

regs_get_kernel_stack_nth() - get Nth entry of the stack :pt_regs which contains kernel stack pointer.
:stack entry number.

regs_get_kernel_stack_nth() returns
th entry of the kernel stack which is specifined by . If the
th entry is NOT in the kernel stack, this returns 0.

Definition at line 148 of file ptrace.c.

unsigned long regs_get_register ( struct pt_regs regs,
unsigned int  offset 
)

Definition at line 1261 of file ptrace.c.

const char* regs_query_register_name ( unsigned int  offset)

regs_query_register_name() - query register name from its offset : the offset of a register in struct pt_regs.

regs_query_register_name() returns the name of a register from its offset in struct pt_regs. If the is invalid, this returns NULL;

Definition at line 116 of file ptrace.c.

int regs_query_register_offset ( const char name)

Definition at line 100 of file ptrace.c.

Variable Documentation

long psw_kernel_bits

Definition at line 67 of file setup.c.

long psw_user_bits

Definition at line 69 of file setup.c.