Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kgdbts: only use new asm-generic/ptrace.h api when needed

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>

authored by

Mike Frysinger and committed by
Linus Torvalds
603d04b2 e12ca23d

+4 -1
+4 -1
drivers/misc/kgdbts.c
··· 304 304 return 1; 305 305 } 306 306 /* Readjust the instruction pointer if needed */ 307 - instruction_pointer_set(&kgdbts_regs, ip + offset); 307 + ip += offset; 308 + #ifdef GDB_ADJUSTS_BREAK_OFFSET 309 + instruction_pointer_set(&kgdbts_regs, ip); 310 + #endif 308 311 return 0; 309 312 } 310 313