ptrace.h (0a8ea52c3eb157dd65e224fc95b7c9c99fcba9f7) | ptrace.h (2dd0e8d2d2a157dbc83295a78336c2217110f2f8) |
---|---|
1/* 2 * Based on arch/arm/include/asm/ptrace.h 3 * 4 * Copyright (C) 1996-2003 Russell King 5 * Copyright (C) 2012 ARM Ltd. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 133 unchanged lines hidden (view full) --- 142 ((regs)->pstate & PSR_MODE_MASK) 143 144#define interrupts_enabled(regs) \ 145 (!((regs)->pstate & PSR_I_BIT)) 146 147#define fast_interrupts_enabled(regs) \ 148 (!((regs)->pstate & PSR_F_BIT)) 149 | 1/* 2 * Based on arch/arm/include/asm/ptrace.h 3 * 4 * Copyright (C) 1996-2003 Russell King 5 * Copyright (C) 2012 ARM Ltd. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 133 unchanged lines hidden (view full) --- 142 ((regs)->pstate & PSR_MODE_MASK) 143 144#define interrupts_enabled(regs) \ 145 (!((regs)->pstate & PSR_I_BIT)) 146 147#define fast_interrupts_enabled(regs) \ 148 (!((regs)->pstate & PSR_F_BIT)) 149 |
150#define user_stack_pointer(regs) \ | 150#define GET_USP(regs) \ |
151 (!compat_user_mode(regs) ? (regs)->sp : (regs)->compat_sp) 152 | 151 (!compat_user_mode(regs) ? (regs)->sp : (regs)->compat_sp) 152 |
153#define SET_USP(ptregs, value) \ 154 (!compat_user_mode(regs) ? ((regs)->sp = value) : ((regs)->compat_sp = value)) 155 |
|
153extern int regs_query_register_offset(const char *name); 154extern const char *regs_query_register_name(unsigned int offset); 155extern unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, 156 unsigned int n); 157 158/** 159 * regs_get_register() - get register value from its offset 160 * @regs: pt_regs from which register value is gotten --- 40 unchanged lines hidden (view full) --- 201{ 202 return regs->regs[0]; 203} 204 205/* We must avoid circular header include via sched.h */ 206struct task_struct; 207int valid_user_regs(struct user_pt_regs *regs, struct task_struct *task); 208 | 156extern int regs_query_register_offset(const char *name); 157extern const char *regs_query_register_name(unsigned int offset); 158extern unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, 159 unsigned int n); 160 161/** 162 * regs_get_register() - get register value from its offset 163 * @regs: pt_regs from which register value is gotten --- 40 unchanged lines hidden (view full) --- 204{ 205 return regs->regs[0]; 206} 207 208/* We must avoid circular header include via sched.h */ 209struct task_struct; 210int valid_user_regs(struct user_pt_regs *regs, struct task_struct *task); 211 |
209#define instruction_pointer(regs) ((unsigned long)(regs)->pc) | 212#define GET_IP(regs) ((unsigned long)(regs)->pc) 213#define SET_IP(regs, value) ((regs)->pc = ((u64) (value))) |
210 | 214 |
215#define GET_FP(ptregs) ((unsigned long)(ptregs)->regs[29]) 216#define SET_FP(ptregs, value) ((ptregs)->regs[29] = ((u64) (value))) 217 218#include <asm-generic/ptrace.h> 219 220#undef profile_pc |
|
211extern unsigned long profile_pc(struct pt_regs *regs); 212 213#endif /* __ASSEMBLY__ */ 214#endif | 221extern unsigned long profile_pc(struct pt_regs *regs); 222 223#endif /* __ASSEMBLY__ */ 224#endif |