|
@@ -3,6 +3,15 @@
|
|
|
|
|
|
|
|
/* Kprobes and Optprobes common header */
|
|
/* Kprobes and Optprobes common header */
|
|
|
|
|
|
|
|
|
|
+#include <asm/asm.h>
|
|
|
|
|
+
|
|
|
|
|
+#ifdef CONFIG_FRAME_POINTER
|
|
|
|
|
+# define SAVE_RBP_STRING " push %" _ASM_BP "\n" \
|
|
|
|
|
+ " mov %" _ASM_SP ", %" _ASM_BP "\n"
|
|
|
|
|
+#else
|
|
|
|
|
+# define SAVE_RBP_STRING " push %" _ASM_BP "\n"
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
#ifdef CONFIG_X86_64
|
|
#ifdef CONFIG_X86_64
|
|
|
#define SAVE_REGS_STRING \
|
|
#define SAVE_REGS_STRING \
|
|
|
/* Skip cs, ip, orig_ax. */ \
|
|
/* Skip cs, ip, orig_ax. */ \
|
|
@@ -17,7 +26,7 @@
|
|
|
" pushq %r10\n" \
|
|
" pushq %r10\n" \
|
|
|
" pushq %r11\n" \
|
|
" pushq %r11\n" \
|
|
|
" pushq %rbx\n" \
|
|
" pushq %rbx\n" \
|
|
|
- " pushq %rbp\n" \
|
|
|
|
|
|
|
+ SAVE_RBP_STRING \
|
|
|
" pushq %r12\n" \
|
|
" pushq %r12\n" \
|
|
|
" pushq %r13\n" \
|
|
" pushq %r13\n" \
|
|
|
" pushq %r14\n" \
|
|
" pushq %r14\n" \
|
|
@@ -48,7 +57,7 @@
|
|
|
" pushl %es\n" \
|
|
" pushl %es\n" \
|
|
|
" pushl %ds\n" \
|
|
" pushl %ds\n" \
|
|
|
" pushl %eax\n" \
|
|
" pushl %eax\n" \
|
|
|
- " pushl %ebp\n" \
|
|
|
|
|
|
|
+ SAVE_RBP_STRING \
|
|
|
" pushl %edi\n" \
|
|
" pushl %edi\n" \
|
|
|
" pushl %esi\n" \
|
|
" pushl %esi\n" \
|
|
|
" pushl %edx\n" \
|
|
" pushl %edx\n" \
|