Quentin Barnes | 35aa1df | 2007-06-11 22:20:10 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * include/asm-arm/kprobes.h |
| 3 | * |
| 4 | * Copyright (C) 2006, 2007 Motorola Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * General Public License for more details. |
| 14 | */ |
| 15 | |
| 16 | #ifndef _ARM_KPROBES_H |
| 17 | #define _ARM_KPROBES_H |
| 18 | |
| 19 | #include <linux/types.h> |
| 20 | #include <linux/ptrace.h> |
| 21 | |
| 22 | typedef u32 kprobe_opcode_t; |
| 23 | |
| 24 | struct kprobe; |
| 25 | typedef void (kprobe_insn_handler_t)(struct kprobe *, struct pt_regs *); |
| 26 | |
| 27 | /* Architecture specific copy of original instruction. */ |
| 28 | struct arch_specific_insn { |
| 29 | kprobe_opcode_t *insn; |
| 30 | kprobe_insn_handler_t *insn_handler; |
| 31 | }; |
| 32 | |
| 33 | enum kprobe_insn { |
| 34 | INSN_REJECTED, |
| 35 | INSN_GOOD, |
| 36 | INSN_GOOD_NO_SLOT |
| 37 | }; |
| 38 | |
| 39 | enum kprobe_insn arm_kprobe_decode_insn(kprobe_opcode_t, |
| 40 | struct arch_specific_insn *); |
| 41 | void __init arm_kprobe_decode_init(void); |
| 42 | |
| 43 | #endif /* _ARM_KPROBES_H */ |