Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
ptrace.c File Reference
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/errno.h>
#include <linux/ptrace.h>
#include <linux/user.h>
#include <linux/security.h>
#include <linux/audit.h>
#include <linux/signal.h>
#include <linux/regset.h>
#include <linux/elf.h>
#include <linux/tracehook.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/ptrace_offsets.h>
#include <asm/rse.h>
#include <asm/uaccess.h>
#include <asm/unwind.h>
#include "entry.h"

Go to the source code of this file.

Data Structures

struct  regset_get
 
struct  regset_set
 
struct  regset_getset
 
struct  syscall_get_set_args
 

Macros

#define IPSR_MASK
 
#define MASK(nbits)   ((1UL << (nbits)) - 1) /* mask with NBITS bits set */
 
#define PFM_MASK   MASK(38)
 
#define PTRACE_DEBUG   0
 
#define dprintk(format...)
 
#define GET_BITS(first, last, unat)
 
#define PUT_BITS(first, last, nat)
 
#define IA64_MLX_TEMPLATE   0x2
 
#define IA64_MOVL_OPCODE   6
 
#define ELF_FP_OFFSET(i)   (i * sizeof(elf_fpreg_t))
 

Typedefs

typedef long(* syncfunc_t )(struct task_struct *, struct switch_stack *, unsigned long, unsigned long)
 

Functions

unsigned long ia64_get_scratch_nat_bits (struct pt_regs *pt, unsigned long scratch_unat)
 
unsigned long ia64_put_scratch_nat_bits (struct pt_regs *pt, unsigned long nat)
 
void ia64_increment_ip (struct pt_regs *regs)
 
void ia64_decrement_ip (struct pt_regs *regs)
 
long ia64_peek (struct task_struct *child, struct switch_stack *child_stack, unsigned long user_rbs_end, unsigned long addr, long *val)
 
long ia64_poke (struct task_struct *child, struct switch_stack *child_stack, unsigned long user_rbs_end, unsigned long addr, long val)
 
unsigned long ia64_get_user_rbs_end (struct task_struct *child, struct pt_regs *pt, unsigned long *cfmp)
 
long ia64_sync_user_rbs (struct task_struct *child, struct switch_stack *sw, unsigned long user_rbs_start, unsigned long user_rbs_end)
 
void ia64_ptrace_stop (void)
 
void ia64_sync_krbs (void)
 
void ptrace_attach_sync_user_rbs (struct task_struct *child)
 
void ia64_flush_fph (struct task_struct *task)
 
void ia64_sync_fph (struct task_struct *task)
 
void user_enable_single_step (struct task_struct *child)
 
void user_enable_block_step (struct task_struct *child)
 
void user_disable_single_step (struct task_struct *child)
 
void ptrace_disable (struct task_struct *child)
 
long arch_ptrace (struct task_struct *child, long request, unsigned long addr, unsigned long data)
 
asmlinkage long syscall_trace_enter (long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6, long arg7, struct pt_regs regs)
 
asmlinkage void syscall_trace_leave (long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6, long arg7, struct pt_regs regs)
 
void do_gpregs_get (struct unw_frame_info *info, void *arg)
 
void do_gpregs_set (struct unw_frame_info *info, void *arg)
 
void do_fpregs_get (struct unw_frame_info *info, void *arg)
 
void do_fpregs_set (struct unw_frame_info *info, void *arg)
 
struct user_regset_viewtask_user_regset_view (struct task_struct *tsk)
 
void ia64_syscall_get_set_arguments (struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args, int rw)
 

Macro Definition Documentation

#define dprintk (   format...)

Definition at line 58 of file ptrace.c.

#define ELF_FP_OFFSET (   i)    (i * sizeof(elf_fpreg_t))

Definition at line 1710 of file ptrace.c.

#define GET_BITS (   first,
  last,
  unat 
)
Value:
({ \
unsigned long bit = ia64_unat_pos(&pt->r##first); \
unsigned long nbits = (last - first + 1); \
unsigned long mask = MASK(nbits) << first; \
unsigned long dist; \
if (bit < first) \
dist = 64 + bit - first; \
else \
dist = bit - first; \
ia64_rotr(unat, dist) & mask; \
})
#define IA64_MLX_TEMPLATE   0x2

Definition at line 147 of file ptrace.c.

#define IA64_MOVL_OPCODE   6

Definition at line 148 of file ptrace.c.

#define IPSR_MASK
Value:

Definition at line 46 of file ptrace.c.

#define MASK (   nbits)    ((1UL << (nbits)) - 1) /* mask with NBITS bits set */

Definition at line 49 of file ptrace.c.

#define PFM_MASK   MASK(38)

Definition at line 50 of file ptrace.c.

#define PTRACE_DEBUG   0

Definition at line 52 of file ptrace.c.

#define PUT_BITS (   first,
  last,
  nat 
)
Value:
({ \
unsigned long bit = ia64_unat_pos(&pt->r##first); \
unsigned long nbits = (last - first + 1); \
unsigned long mask = MASK(nbits) << first; \
long dist; \
if (bit < first) \
dist = 64 + bit - first; \
else \
dist = bit - first; \
ia64_rotl(nat & mask, dist); \
})

Typedef Documentation

typedef long(* syncfunc_t)(struct task_struct *, struct switch_stack *, unsigned long, unsigned long)

Definition at line 573 of file ptrace.c.

Function Documentation

long arch_ptrace ( struct task_struct child,
long  request,
unsigned long  addr,
unsigned long  data 
)

Definition at line 1179 of file ptrace.c.

void do_fpregs_get ( struct unw_frame_info info,
void arg 
)

Definition at line 1712 of file ptrace.c.

void do_fpregs_set ( struct unw_frame_info info,
void arg 
)

Definition at line 1770 of file ptrace.c.

void do_gpregs_get ( struct unw_frame_info info,
void arg 
)

Definition at line 1522 of file ptrace.c.

void do_gpregs_set ( struct unw_frame_info info,
void arg 
)

Definition at line 1622 of file ptrace.c.

void ia64_decrement_ip ( struct pt_regs regs)

Definition at line 174 of file ptrace.c.

void ia64_flush_fph ( struct task_struct task)
inline

Definition at line 706 of file ptrace.c.

unsigned long ia64_get_scratch_nat_bits ( struct pt_regs pt,
unsigned long  scratch_unat 
)

Definition at line 74 of file ptrace.c.

unsigned long ia64_get_user_rbs_end ( struct task_struct child,
struct pt_regs pt,
unsigned long cfmp 
)

Definition at line 507 of file ptrace.c.

void ia64_increment_ip ( struct pt_regs regs)

Definition at line 151 of file ptrace.c.

long ia64_peek ( struct task_struct child,
struct switch_stack child_stack,
unsigned long  user_rbs_end,
unsigned long  addr,
long val 
)

Definition at line 402 of file ptrace.c.

long ia64_poke ( struct task_struct child,
struct switch_stack child_stack,
unsigned long  user_rbs_end,
unsigned long  addr,
long  val 
)

Definition at line 464 of file ptrace.c.

void ia64_ptrace_stop ( void  )

Definition at line 600 of file ptrace.c.

unsigned long ia64_put_scratch_nat_bits ( struct pt_regs pt,
unsigned long  nat 
)

Definition at line 113 of file ptrace.c.

void ia64_sync_fph ( struct task_struct task)

Definition at line 732 of file ptrace.c.

void ia64_sync_krbs ( void  )

Definition at line 611 of file ptrace.c.

long ia64_sync_user_rbs ( struct task_struct child,
struct switch_stack sw,
unsigned long  user_rbs_start,
unsigned long  user_rbs_end 
)

Definition at line 535 of file ptrace.c.

void ia64_syscall_get_set_arguments ( struct task_struct task,
struct pt_regs regs,
unsigned int  i,
unsigned int  n,
unsigned long args,
int  rw 
)

Definition at line 2201 of file ptrace.c.

void ptrace_attach_sync_user_rbs ( struct task_struct child)

Definition at line 627 of file ptrace.c.

void ptrace_disable ( struct task_struct child)

Definition at line 1173 of file ptrace.c.

asmlinkage long syscall_trace_enter ( long  arg0,
long  arg1,
long  arg2,
long  arg3,
long  arg4,
long  arg5,
long  arg6,
long  arg7,
struct pt_regs  regs 
)

Definition at line 1236 of file ptrace.c.

asmlinkage void syscall_trace_leave ( long  arg0,
long  arg1,
long  arg2,
long  arg3,
long  arg4,
long  arg5,
long  arg6,
long  arg7,
struct pt_regs  regs 
)

Definition at line 1257 of file ptrace.c.

struct user_regset_view* task_user_regset_view ( struct task_struct tsk)
read

task_user_regset_view - Return the process's native regset view. : a thread of the process in question

Return the &struct user_regset_view that is native for the given process. For example, what it would access when it called ptrace(). Throughout the life of the process, this only changes at exec.

Definition at line 2153 of file ptrace.c.

void user_disable_single_step ( struct task_struct child)

Definition at line 1157 of file ptrace.c.

void user_enable_block_step ( struct task_struct child)

Definition at line 1148 of file ptrace.c.

void user_enable_single_step ( struct task_struct child)

Definition at line 1139 of file ptrace.c.