Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191271
b: refs/heads/master
c: 73266fc
h: refs/heads/master
i:
  191269: b858ae4
  191267: 1d17ced
  191263: 81def82
v: v3
  • Loading branch information
Frederic Weisbecker committed May 1, 2010
1 parent 2963820 commit 955e80a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d00a47cce569a3e660a8c9de5d57af28d6a9f0f7
refs/heads/master: 73266fc1df2f94cf72b3beba3eee3b88ed0b0664
2 changes: 1 addition & 1 deletion trunk/arch/sh/kernel/ptrace_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static int set_single_step(struct task_struct *tsk, unsigned long addr)

bp = thread->ptrace_bps[0];
if (!bp) {
hw_breakpoint_init(&attr);
ptrace_breakpoint_init(&attr);

attr.bp_addr = addr;
attr.bp_len = HW_BREAKPOINT_LEN_2;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ static int ptrace_set_breakpoint_addr(struct task_struct *tsk, int nr,
struct perf_event_attr attr;

if (!t->ptrace_bps[nr]) {
hw_breakpoint_init(&attr);
ptrace_breakpoint_init(&attr);
/*
* Put stub len and type to register (reserve) an inactive but
* correct bp
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/hw_breakpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ static inline void hw_breakpoint_init(struct perf_event_attr *attr)
attr->sample_period = 1;
}

static inline void ptrace_breakpoint_init(struct perf_event_attr *attr)
{
hw_breakpoint_init(attr);
attr->exclude_kernel = 1;
}

static inline unsigned long hw_breakpoint_addr(struct perf_event *bp)
{
return bp->attr.bp_addr;
Expand Down

0 comments on commit 955e80a

Please sign in to comment.