diff options
Diffstat (limited to 'include/linux/hw_breakpoint.h')
-rw-r--r-- | include/linux/hw_breakpoint.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index c70d27af03f9..a0aa5a9cfb0e 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
@@ -34,6 +34,12 @@ static inline void hw_breakpoint_init(struct perf_event_attr *attr) | |||
34 | attr->sample_period = 1; | 34 | attr->sample_period = 1; |
35 | } | 35 | } |
36 | 36 | ||
37 | static inline void ptrace_breakpoint_init(struct perf_event_attr *attr) | ||
38 | { | ||
39 | hw_breakpoint_init(attr); | ||
40 | attr->exclude_kernel = 1; | ||
41 | } | ||
42 | |||
37 | static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) | 43 | static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) |
38 | { | 44 | { |
39 | return bp->attr.bp_addr; | 45 | return bp->attr.bp_addr; |