-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 252047 b: refs/heads/master c: edeafa7 h: refs/heads/master i: 252045: db60a2b 252043: 002be0e 252039: 9116d87 252031: 375fe41 v: v3
- Loading branch information
Mike Frysinger
authored and
Linus Torvalds
committed
May 27, 2011
1 parent
cf25202
commit 004e0b4
Showing
2 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 456f998ec817ebfa254464be4f089542fa390645 | ||
refs/heads/master: edeafa74e69f275649624484cdd8b551c8839163 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* 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); | ||
} | ||
static inline void instruction_pointer_set(struct pt_regs *regs, | ||
unsigned long val) | ||
{ | ||
SET_IP(regs, val); | ||
} | ||
|
||
#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); | ||
} | ||
static inline void user_stack_pointer_set(struct pt_regs *regs, | ||
unsigned long val) | ||
{ | ||
SET_USP(regs, val); | ||
} | ||
|
||
/* 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); | ||
} | ||
static inline void frame_pointer_set(struct pt_regs *regs, | ||
unsigned long val) | ||
{ | ||
SET_FP(regs, val); | ||
} | ||
|
||
#endif /* __ASSEMBLY__ */ | ||
|
||
#endif |