cregit-Linux how code gets into the kernel

Release 4.7 include/asm-generic/ptrace.h

/*
 * Common low level (register) ptrace helpers
 *
 * Copyright 2004-2011 Analog Devices Inc.
 *
 * Licensed under the GPL-2 or later.
 */

#ifndef __ASM_GENERIC_PTRACE_H__

#define __ASM_GENERIC_PTRACE_H__

#ifndef __ASSEMBLY__

/* Helpers for working with the instruction pointer */
#ifndef GET_IP

#define GET_IP(regs) ((regs)->pc)
#endif
#ifndef SET_IP

#define SET_IP(regs, val) (GET_IP(regs) = (val))
#endif


static inline unsigned long instruction_pointer(struct pt_regs *regs) { return GET_IP(regs); }

Contributors

PersonTokensPropCommitsCommitProp
mike frysingermike frysinger19100.00%1100.00%
Total19100.00%1100.00%


static inline void instruction_pointer_set(struct pt_regs *regs, unsigned long val) { SET_IP(regs, val); }

Contributors

PersonTokensPropCommitsCommitProp
mike frysingermike frysinger23100.00%1100.00%
Total23100.00%1100.00%

#ifndef profile_pc #define profile_pc(regs) instruction_pointer(regs) #endif /* Helpers for working with the user stack pointer */ #ifndef GET_USP #define GET_USP(regs) ((regs)->usp) #endif #ifndef SET_USP #define SET_USP(regs, val) (GET_USP(regs) = (val)) #endif
static inline unsigned long user_stack_pointer(struct pt_regs *regs) { return GET_USP(regs); }

Contributors

PersonTokensPropCommitsCommitProp
mike frysingermike frysinger19100.00%1100.00%
Total19100.00%1100.00%


static inline void user_stack_pointer_set(struct pt_regs *regs, unsigned long val) { SET_USP(regs, val); }

Contributors

PersonTokensPropCommitsCommitProp
mike frysingermike frysinger23100.00%1100.00%
Total23100.00%1100.00%

/* Helpers for working with the frame pointer */ #ifndef GET_FP #define GET_FP(regs) ((regs)->fp) #endif #ifndef SET_FP #define SET_FP(regs, val) (GET_FP(regs) = (val)) #endif
static inline unsigned long frame_pointer(struct pt_regs *regs) { return GET_FP(regs); }

Contributors

PersonTokensPropCommitsCommitProp
mike frysingermike frysinger19100.00%1100.00%
Total19100.00%1100.00%


static inline void frame_pointer_set(struct pt_regs *regs, unsigned long val) { SET_FP(regs, val); }

Contributors

PersonTokensPropCommitsCommitProp
mike frysingermike frysinger23100.00%1100.00%
Total23100.00%1100.00%

#endif /* __ASSEMBLY__ */ #endif

Overall Contributors

PersonTokensPropCommitsCommitProp
mike frysingermike frysinger234100.00%1100.00%
Total234100.00%1100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
{% endraw %}