[REFACTOR] move 'struct prev_kprobe'
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 3 Apr 2013 13:16:44 +0000 (17:16 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 3 Apr 2013 13:16:44 +0000 (17:16 +0400)
from src/modules/kprobe/arch/dbi_kprobes.h
to src/modules/kprobe/arch/asm-arm/dbi_kprobes.h

driver/Makefile.am
driver/module.c
driver/sspt/ip.c
driver/storage.c
kprobe/Makefile.am
kprobe/arch/asm-arm/dbi_kprobes.h
kprobe/arch/dbi_kprobes.h
kprobe/dbi_kprobes.h
uprobe/arch/asm-arm/swap_uprobes.c
uprobe/swap_uprobes.c

index 730fdde..a6440c1 100644 (file)
@@ -33,8 +33,11 @@ driver_module_dir = $(realpath $(srcdir))
 module_name = swap_driver
 cross_compiler = $(subst gcc,,$(CC))
 
-inlude_opt = -I$(realpath $(top_srcdir)/src/modules/ksyms) -I$(realpath $(top_srcdir)/src/common) \
-             -I$(realpath $(top_srcdir)/src/profile) -I$(realpath $(top_srcdir)/src/modules/kprobe) \
+inlude_opt = -I$(realpath $(top_srcdir)/src/modules/ksyms) \
+             -I$(realpath $(top_srcdir)/src/common) \
+             -I$(realpath $(top_srcdir)/src/profile) \
+             -I$(realpath $(top_srcdir)/src/modules/kprobe) \
+             -I$(realpath $(top_srcdir)/src/modules/kprobe/arch) \
              -I$(realpath $(top_srcdir)/src/modules/uprobe)
 extra_cflags = "$(inlude_opt) -DEC_ARCH_$(ARCH) -D__DEBUG $(memchecker) $(debug_opt) $(android_opt) $(slp_opt) $(android_app_opt) $(board_opt)"
 
index c74dc82..c600fe1 100644 (file)
@@ -16,6 +16,7 @@
 ////////////////////////////////////////////////////////////////////////////////////
 
 #include "module.h"
+#include <ksyms.h>
 
 static char gl_szDefaultDeviceName[128] = DEFAULT_DEVICE_NAME;
 char* device_name = NULL;
index 49f6ab2..f29f08e 100644 (file)
@@ -22,6 +22,7 @@
  *
  */
 
+#include <linux/slab.h>
 #include "ip.h"
 #include "sspt_page.h"
 #include "sspt_file.h"
index 4338115..3126246 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/spinlock.h>
 #include <linux/kernel.h>
 #include <linux/time.h>
+#include <ksyms.h>
 #include "module.h"
 #include "storage.h"
 #include "handlers_core.h"
index 233b981..36536e9 100644 (file)
@@ -16,7 +16,9 @@ kprobes_module_dir = $(realpath $(top_srcdir)/src/modules/kprobe)
 module_name = swap_kprobe
 cross_compiler = $(subst gcc,,$(CC))
 
-inlude_opt = -I$(realpath $(top_srcdir)/src/modules/ksyms)
+inlude_opt = -I$(realpath $(top_srcdir)/src/modules/ksyms) \
+             -I$(realpath $(top_srcdir)/src/modules/kprobe) \
+             -I$(realpath $(top_srcdir)/src/modules/kprobe/arch)
 extra_cflags = "$(inlude_opt) $(android_opt) $(board_opt)"
 
 all-local:
index 7260ea3..2fa579b 100644 (file)
@@ -30,8 +30,6 @@
  */
 
 #include <linux/sched.h>
-#include "../../dbi_kprobes_deps.h"
-#include "../dbi_kprobes.h"
 
 typedef unsigned long kprobe_opcode_t;
 
@@ -64,6 +62,11 @@ typedef unsigned long kprobe_opcode_t;
 
 #define UREGS_OFFSET 8
 
+struct prev_kprobe {
+       struct kprobe *kp;
+       unsigned long status;
+};
+
 static inline unsigned long arch_get_task_pc(struct task_struct *p)
 {
        return task_thread_info(p)->cpu_context.pc;
index 61cbc31..a8558d4 100644 (file)
@@ -57,11 +57,6 @@ struct kretprobe_instance;
 struct task_struct;
 struct kprobe_ctlblk;
 
-struct prev_kprobe {
-       struct kprobe *kp;
-       unsigned long status;
-};
-
 void kretprobe_trampoline (void);
 
 extern void __arch_prepare_kretprobe (struct kretprobe *rp, struct pt_regs *regs);
@@ -73,7 +68,6 @@ extern int arch_init_kprobes (void);
 extern void dbi_arch_exit_kprobes (void);
 extern int patch_suspended_task(struct kretprobe *rp, struct task_struct *tsk);
 
-void prepare_singlestep (struct kprobe *p, struct pt_regs *regs);
 void save_previous_kprobe (struct kprobe_ctlblk *kcb, struct kprobe *cur_p);
 void restore_previous_kprobe (struct kprobe_ctlblk *kcb);
 void set_current_kprobe (struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb);
index 06d8bd5..2820acf 100644 (file)
@@ -58,7 +58,7 @@
 #include <linux/sched.h>
 #include <linux/pagemap.h>
 
-#include "arch/asm/dbi_kprobes.h"
+#include <asm/dbi_kprobes.h>
 
 /* kprobe_status settings */
 #define KPROBE_HIT_ACTIVE      0x00000001
@@ -274,5 +274,7 @@ struct kprobe *kprobe_running (void);
 void reset_current_kprobe (void);
 struct kprobe_ctlblk *get_kprobe_ctlblk (void);
 
+void prepare_singlestep(struct kprobe *p, struct pt_regs *regs);
+
 #endif /* _DBI_KPROBES_H */
 
index eb4a5f6..33f3525 100644 (file)
@@ -5,6 +5,7 @@
 #include <swap_uprobes.h>
 #include <asm/swap_uprobes.h>
 #include <dbi_insn_slots.h>
+#include <dbi_kprobes_deps.h>
 #include "trampoline_thumb.h"
 
 // FIXME:
index 48ce30b..a60c38f 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/mempolicy.h>
 #include <linux/module.h>
 #include <dbi_insn_slots.h>
+#include <dbi_kprobes_deps.h>
 
 enum {
        UPROBE_HASH_BITS  = 10,