Go to the documentation of this file.
10 #ifndef __ASM_ARM_PTRACE_H
11 #define __ASM_ARM_PTRACE_H
13 #include <uapi/asm/ptrace.h>
20 #define user_mode(regs) \
21 (((regs)->ARM_cpsr & 0xf) == 0)
23 #ifdef CONFIG_ARM_THUMB
24 #define thumb_mode(regs) \
25 (((regs)->ARM_cpsr & PSR_T_BIT))
27 #define thumb_mode(regs) (0)
30 #define isa_mode(regs) \
31 ((((regs)->ARM_cpsr & PSR_J_BIT) >> 23) | \
32 (((regs)->ARM_cpsr & PSR_T_BIT) >> 5))
34 #define processor_mode(regs) \
35 ((regs)->ARM_cpsr & MODE_MASK)
37 #define interrupts_enabled(regs) \
38 (!((regs)->ARM_cpsr & PSR_I_BIT))
40 #define fast_interrupts_enabled(regs) \
41 (!((regs)->ARM_cpsr & PSR_F_BIT))
46 static inline int valid_user_regs(
struct pt_regs *
regs)
72 static inline long regs_return_value(
struct pt_regs *
regs)
77 #define instruction_pointer(regs) (regs)->ARM_pc
82 #define profile_pc(regs) instruction_pointer(regs)
85 #define predicate(x) ((x) & 0xf0000000)
86 #define PREDICATE_ALWAYS 0xe0000000
94 #define is_wide_instruction(instr) ((unsigned)(instr) >= 0xe800)
99 #include <linux/stddef.h>
100 #include <linux/types.h>
101 #define MAX_REG_OFFSET (offsetof(struct pt_regs, ARM_ORIG_r0))
118 static inline unsigned long regs_get_register(
struct pt_regs *
regs,
123 return *(
unsigned long *)((
unsigned long)regs +
offset);
137 #define current_pt_regs(void) ({ \
138 register unsigned long sp asm ("sp"); \
139 (struct pt_regs *)((sp | (THREAD_SIZE - 1)) - 7) - 1; \