uprobes.c (cf40a76e7d5874bb25f4404eecc58a2e033af885) uprobes.c (26a04d84bc5311d7785b229b353f327e866ab61a)
1/*
2 * Copyright (C) 2014-2016 Pratyush Anand <panand@redhat.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8#include <linux/highmem.h>

--- 181 unchanged lines hidden (view full) ---

190 return DBG_HOOK_HANDLED;
191 }
192
193 return DBG_HOOK_ERROR;
194}
195
196/* uprobe breakpoint handler hook */
197static struct break_hook uprobes_break_hook = {
1/*
2 * Copyright (C) 2014-2016 Pratyush Anand <panand@redhat.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8#include <linux/highmem.h>

--- 181 unchanged lines hidden (view full) ---

190 return DBG_HOOK_HANDLED;
191 }
192
193 return DBG_HOOK_ERROR;
194}
195
196/* uprobe breakpoint handler hook */
197static struct break_hook uprobes_break_hook = {
198 .esr_mask = BRK64_ESR_MASK,
199 .esr_val = BRK64_ESR_UPROBES,
198 .imm = BRK64_ESR_UPROBES,
200 .fn = uprobe_breakpoint_handler,
201};
202
203/* uprobe single step handler hook */
204static struct step_hook uprobes_step_hook = {
205 .fn = uprobe_single_step_handler,
206};
207
208static int __init arch_init_uprobes(void)
209{
199 .fn = uprobe_breakpoint_handler,
200};
201
202/* uprobe single step handler hook */
203static struct step_hook uprobes_step_hook = {
204 .fn = uprobe_single_step_handler,
205};
206
207static int __init arch_init_uprobes(void)
208{
210 register_break_hook(&uprobes_break_hook);
211 register_step_hook(&uprobes_step_hook);
209 register_user_break_hook(&uprobes_break_hook);
210 register_user_step_hook(&uprobes_step_hook);
212
213 return 0;
214}
215
216device_initcall(arch_init_uprobes);
211
212 return 0;
213}
214
215device_initcall(arch_init_uprobes);