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 <linux/stringify.h>
#include <linux/stddef.h>
#include <linux/thread_info.h>
#include <asm/addrspace.h>
#include <asm/page.h>
#include <uapi/asm/ptrace.h>
#include <asm-generic/ptrace.h>

Go to the source code of this file.

Data Structures

struct  pt_regs_offset
 

Macros

#define user_mode(regs)   (((regs)->sr & 0x40000000)==0)
 
#define kernel_stack_pointer(_regs)   ((unsigned long)(_regs)->regs[15])
 
#define GET_FP(regs)   ((regs)->regs[14])
 
#define GET_USP(regs)   ((regs)->regs[15])
 
#define arch_has_single_step()   (1)
 
#define REG_OFFSET_NAME(r)   {.name = #r, .offset = offsetof(struct pt_regs, r)}
 
#define REGS_OFFSET_NAME(num)   {.name = __stringify(r##num), .offset = offsetof(struct pt_regs, regs[num])}
 
#define TREGS_OFFSET_NAME(num)   {.name = __stringify(tr##num), .offset = offsetof(struct pt_regs, tregs[num])}
 
#define REG_OFFSET_END   {.name = NULL, .offset = 0}
 
#define task_pt_regs(task)   ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1)
 
#define profile_pc   profile_pc
 

Functions

int regs_query_register_offset (const char *name)
 
const charregs_query_register_name (unsigned int offset)
 
void ptrace_triggered (struct perf_event *bp, struct perf_sample_data *data, struct pt_regs *regs)
 

Variables

struct pt_regs_offset regoffset_table []
 

Macro Definition Documentation

#define arch_has_single_step ( )    (1)

Definition at line 21 of file ptrace.h.

#define GET_FP (   regs)    ((regs)->regs[14])

Definition at line 18 of file ptrace.h.

#define GET_USP (   regs)    ((regs)->regs[15])

Definition at line 19 of file ptrace.h.

#define kernel_stack_pointer (   _regs)    ((unsigned long)(_regs)->regs[15])

Definition at line 16 of file ptrace.h.

#define profile_pc   profile_pc

Definition at line 114 of file ptrace.h.

#define REG_OFFSET_END   {.name = NULL, .offset = 0}

Definition at line 36 of file ptrace.h.

#define REG_OFFSET_NAME (   r)    {.name = #r, .offset = offsetof(struct pt_regs, r)}

Definition at line 31 of file ptrace.h.

#define REGS_OFFSET_NAME (   num)    {.name = __stringify(r##num), .offset = offsetof(struct pt_regs, regs[num])}

Definition at line 32 of file ptrace.h.

#define task_pt_regs (   task)    ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1)

Definition at line 102 of file ptrace.h.

#define TREGS_OFFSET_NAME (   num)    {.name = __stringify(tr##num), .offset = offsetof(struct pt_regs, tregs[num])}

Definition at line 34 of file ptrace.h.

#define user_mode (   regs)    (((regs)->sr & 0x40000000)==0)

Definition at line 15 of file ptrace.h.

Function Documentation

void ptrace_triggered ( struct perf_event bp,
struct perf_sample_data *  data,
struct pt_regs regs 
)

Definition at line 65 of file ptrace_32.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

struct pt_regs_offset regoffset_table[]

Definition at line 283 of file ptrace_32.c.