uprobes.c (fb610f2a2006322bebeb30408fefce6a01df09ea) uprobes.c (453b7740ebfda2d84be7fb583c54f0c91c592869)
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>

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

186 if (uprobe_post_sstep_notifier(regs))
187 return DBG_HOOK_HANDLED;
188
189 return DBG_HOOK_ERROR;
190}
191
192/* uprobe breakpoint handler hook */
193static 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>

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

186 if (uprobe_post_sstep_notifier(regs))
187 return DBG_HOOK_HANDLED;
188
189 return DBG_HOOK_ERROR;
190}
191
192/* uprobe breakpoint handler hook */
193static struct break_hook uprobes_break_hook = {
194 .imm = BRK64_ESR_UPROBES,
194 .imm = UPROBES_BRK_IMM,
195 .fn = uprobe_breakpoint_handler,
196};
197
198/* uprobe single step handler hook */
199static struct step_hook uprobes_step_hook = {
200 .fn = uprobe_single_step_handler,
201};
202
203static int __init arch_init_uprobes(void)
204{
205 register_user_break_hook(&uprobes_break_hook);
206 register_user_step_hook(&uprobes_step_hook);
207
208 return 0;
209}
210
211device_initcall(arch_init_uprobes);
195 .fn = uprobe_breakpoint_handler,
196};
197
198/* uprobe single step handler hook */
199static struct step_hook uprobes_step_hook = {
200 .fn = uprobe_single_step_handler,
201};
202
203static int __init arch_init_uprobes(void)
204{
205 register_user_break_hook(&uprobes_break_hook);
206 register_user_step_hook(&uprobes_step_hook);
207
208 return 0;
209}
210
211device_initcall(arch_init_uprobes);