Skip to content

Commit

Permalink
kgdbts: only use new asm-generic/ptrace.h api when needed
Browse files Browse the repository at this point in the history
The new instruction_pointer_set helper is defined for people who have
converted to asm-generic/ptrace.h, so don't use it generally unless
the arch needs it (in which case it has been converted).  This should
fix building of kgdb tests for arches not yet converted.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Jun 1, 2011
1 parent e12ca23 commit 603d04b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/misc/kgdbts.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ static int check_and_rewind_pc(char *put_str, char *arg)
return 1;
}
/* Readjust the instruction pointer if needed */
instruction_pointer_set(&kgdbts_regs, ip + offset);
ip += offset;
#ifdef GDB_ADJUSTS_BREAK_OFFSET
instruction_pointer_set(&kgdbts_regs, ip);
#endif
return 0;
}

Expand Down

0 comments on commit 603d04b

Please sign in to comment.