blob: 951322328793e13613b771dc507bd9032a7c2b19 [file] [log] [blame]
Quentin Barnes35aa1df2007-06-11 22:20:10 +00001/*
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
22typedef u32 kprobe_opcode_t;
23
24struct kprobe;
25typedef void (kprobe_insn_handler_t)(struct kprobe *, struct pt_regs *);
26
27/* Architecture specific copy of original instruction. */
28struct arch_specific_insn {
29 kprobe_opcode_t *insn;
30 kprobe_insn_handler_t *insn_handler;
31};
32
33enum kprobe_insn {
34 INSN_REJECTED,
35 INSN_GOOD,
36 INSN_GOOD_NO_SLOT
37};
38
39enum kprobe_insn arm_kprobe_decode_insn(kprobe_opcode_t,
40 struct arch_specific_insn *);
41void __init arm_kprobe_decode_init(void);
42
43#endif /* _ARM_KPROBES_H */