您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ user_disable_single_step函数代码示例

51自学网 2021-06-03 09:22:50
  C++
这篇教程C++ user_disable_single_step函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中user_disable_single_step函数的典型用法代码示例。如果您正苦于以下问题:C++ user_disable_single_step函数的具体用法?C++ user_disable_single_step怎么用?C++ user_disable_single_step使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了user_disable_single_step函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ptrace_resume

static int ptrace_resume(struct task_struct *child, long request,			 unsigned long data){	if (!valid_signal(data))		return -EIO;	if (request == PTRACE_SYSCALL)		set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);	else		clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);#ifdef TIF_SYSCALL_EMU	if (request == PTRACE_SYSEMU || request == PTRACE_SYSEMU_SINGLESTEP)		set_tsk_thread_flag(child, TIF_SYSCALL_EMU);	else		clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);#endif	if (is_singleblock(request)) {		if (unlikely(!arch_has_block_step()))			return -EIO;		user_enable_block_step(child);	} else if (is_singlestep(request) || is_sysemu_singlestep(request)) {		if (unlikely(!arch_has_single_step()))			return -EIO;		user_enable_single_step(child);	} else {		user_disable_single_step(child);	}	child->exit_code = data;	wake_up_state(child, __TASK_TRACED);	return 0;}
开发者ID:grzmot22,项目名称:android_kernel_hp_pine,代码行数:35,


示例2: arch_uprobe_abort_xol

/* * This function gets called when XOL instruction either gets trapped or * the thread has a fatal signal, so reset the instruction pointer to its * probed address. */void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs){	struct uprobe_task *utask = current->utask;	current->thread.trap_nr = utask->autask.saved_trap_nr;	instruction_pointer_set(regs, utask->vaddr);	user_disable_single_step(current);}
开发者ID:AdrianHuang,项目名称:linux-3.8.13,代码行数:14,


示例3: ptrace_disable

/* * Called by kernel/ptrace.c when detaching.. */void ptrace_disable(struct task_struct *child){	/*	 * This would be better off in core code, but PTRACE_DETACH has	 * grown its fair share of arch-specific worts and changing it	 * is likely to cause regressions on obscure architectures.	 */	user_disable_single_step(child);}
开发者ID:Truestark,项目名称:ThugLife_bullhead,代码行数:12,


示例4: ptrace_disable

/* * Called by kernel/ptrace.c when detaching. * * Make sure the single step bit is not set. */voidptrace_disable(struct task_struct *child){	/* Deconfigure SPC and S-bit. */	user_disable_single_step(child);	put_reg(child, PT_SPC, 0);	/* Deconfigure any watchpoints associated with the child. */	deconfigure_bp(child->pid);}
开发者ID:AshishNamdev,项目名称:linux,代码行数:15,


示例5: reinstall_suspended_bps

/* * Handle single-step exception. */int reinstall_suspended_bps(struct pt_regs *regs){	struct debug_info *debug_info = &current->thread.debug;	int handled_exception = 0, *kernel_step;	kernel_step = this_cpu_ptr(&stepping_kernel_bp);	/*	 * Called from single-step exception handler.	 * Return 0 if execution can resume, 1 if a SIGTRAP should be	 * reported.	 */	if (user_mode(regs)) {		if (debug_info->bps_disabled) {			debug_info->bps_disabled = 0;			toggle_bp_registers(AARCH64_DBG_REG_BCR, DBG_ACTIVE_EL0, 1);			handled_exception = 1;		}		if (debug_info->wps_disabled) {			debug_info->wps_disabled = 0;			toggle_bp_registers(AARCH64_DBG_REG_WCR, DBG_ACTIVE_EL0, 1);			handled_exception = 1;		}		if (handled_exception) {			if (debug_info->suspended_step) {				debug_info->suspended_step = 0;				/* Allow exception handling to fall-through. */				handled_exception = 0;			} else {				user_disable_single_step(current);			}		}	} else if (*kernel_step != ARM_KERNEL_STEP_NONE) {		toggle_bp_registers(AARCH64_DBG_REG_BCR, DBG_ACTIVE_EL1, 1);		toggle_bp_registers(AARCH64_DBG_REG_WCR, DBG_ACTIVE_EL1, 1);		if (!debug_info->wps_disabled)			toggle_bp_registers(AARCH64_DBG_REG_WCR, DBG_ACTIVE_EL0, 1);		if (*kernel_step != ARM_KERNEL_STEP_SUSPEND) {			kernel_disable_single_step();			handled_exception = 1;		} else {			handled_exception = 0;		}		*kernel_step = ARM_KERNEL_STEP_NONE;	}	return !handled_exception;}
开发者ID:Sublime-Development,项目名称:kernel_flounder,代码行数:56,


示例6: arch_uprobe_abort_xol

void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs){	struct uprobe_task *utask = current->utask;	/*	 * Task has received a fatal signal, so reset back to probbed	 * address.	 */	instruction_pointer_set(regs, utask->vaddr);	user_disable_single_step(current);}
开发者ID:01org,项目名称:thunderbolt-software-kernel-tree,代码行数:12,


示例7: arch_uprobe_post_xol

int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs){	struct uprobe_task *utask = current->utask;	WARN_ON_ONCE(current->thread.fault_code != UPROBE_INV_FAULT_CODE);	/* Instruction points to execute next to breakpoint address */	instruction_pointer_set(regs, utask->vaddr + 4);	user_disable_single_step(current);	return 0;}
开发者ID:01org,项目名称:thunderbolt-software-kernel-tree,代码行数:13,


示例8: arch_uprobe_post_xol

/* * Called after single-stepping. To avoid the SMP problems that can * occur when we temporarily put back the original opcode to * single-step, we single-stepped a copy of the instruction. * * This function prepares to resume execution after the single-step. */int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs){	struct uprobe_task *utask = current->utask;	WARN_ON_ONCE(current->thread.trap_nr != UPROBE_TRAP_NR);	current->thread.trap_nr = utask->autask.saved_trap_nr;	/*	 * On powerpc, except for loads and stores, most instructions	 * including ones that alter code flow (branches, calls, returns)	 * are emulated in the kernel. We get here only if the emulation	 * support doesn't exist and have to fix-up the next instruction	 * to be executed.	 */	regs->nip = utask->vaddr + MAX_UINSN_BYTES;	user_disable_single_step(current);	return 0;}
开发者ID:AdrianHuang,项目名称:linux-3.8.13,代码行数:27,


示例9: do_ri

asmlinkage void do_ri(struct pt_regs *regs){	unsigned long epc_insn;	unsigned long epc = regs->cp0_epc;	read_tsk_long(current, epc, &epc_insn);	if (current->thread.single_step == 1) {		if ((epc == current->thread.addr1) ||		    (epc == current->thread.addr2)) {			user_disable_single_step(current);			force_sig(SIGTRAP, current);			return;		} else			BUG();	} else if ((epc_insn == BREAKPOINT32_INSN) ||		   ((epc_insn & 0x0000FFFF) == 0x7002) ||		   ((epc_insn & 0xFFFF0000) == 0x70020000)) {			force_sig(SIGTRAP, current);			return;	} else {		die_if_kernel("do_ri execution Exception", regs);		force_sig(SIGILL, current);	}}
开发者ID:Gangfeng,项目名称:linux-1,代码行数:24,


示例10: ptrace_disable

/* * Called by kernel/ptrace.c when detaching.. */void ptrace_disable(struct task_struct *child){	user_disable_single_step(child);}
开发者ID:andi34,项目名称:Dhollmen_Kernel,代码行数:7,


示例11: ptrace_disable

/* * Called by kernel/ptrace.c when detaching.. * * Make sure single step bits etc are not set. */voidptrace_disable(struct task_struct *child){	/* make sure the single step bit is not set. */	user_disable_single_step(child);}
开发者ID:710leo,项目名称:LVS,代码行数:11,


示例12: ptrace_disable

void ptrace_disable(struct task_struct *child){	/* Boilerplate - resolves to null inline if no HW single-step */	user_disable_single_step(child);}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:5,


示例13: ERR_PTR

//.........这里部分代码省略.........		goto bad_fork_cleanup_namespaces;	retval = copy_thread(clone_flags, stack_start, stack_size, p, regs);	if (retval)		goto bad_fork_cleanup_io;	if (pid != &init_struct_pid) {		retval = -ENOMEM;		pid = alloc_pid(p->nsproxy->pid_ns);		if (!pid)			goto bad_fork_cleanup_io;	}	p->pid = pid_nr(pid);	p->tgid = p->pid;	if (clone_flags & CLONE_THREAD)		p->tgid = current->tgid;	p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL;	p->clear_child_tid = (clone_flags & CLONE_CHILD_CLEARTID) ? child_tidptr : NULL;#ifdef CONFIG_BLOCK	p->plug = NULL;#endif#ifdef CONFIG_FUTEX	p->robust_list = NULL;#ifdef CONFIG_COMPAT	p->compat_robust_list = NULL;#endif	INIT_LIST_HEAD(&p->pi_state_list);	p->pi_state_cache = NULL;#endif	if ((clone_flags & (CLONE_VM|CLONE_VFORK)) == CLONE_VM)		p->sas_ss_sp = p->sas_ss_size = 0;	user_disable_single_step(p);	clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE);#ifdef TIF_SYSCALL_EMU	clear_tsk_thread_flag(p, TIF_SYSCALL_EMU);#endif	clear_all_latency_tracing(p);		if (clone_flags & CLONE_THREAD)		p->exit_signal = -1;	else if (clone_flags & CLONE_PARENT)		p->exit_signal = current->group_leader->exit_signal;	else		p->exit_signal = (clone_flags & CSIGNAL);	p->pdeath_signal = 0;	p->exit_state = 0;	p->nr_dirtied = 0;	p->nr_dirtied_pause = 128 >> (PAGE_SHIFT - 10);	p->dirty_paused_when = 0;	p->group_leader = p;	INIT_LIST_HEAD(&p->thread_group);	cgroup_fork_callbacks(p);	cgroup_callbacks_done = 1;		write_lock_irq(&tasklist_lock);		if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) {
开发者ID:MiniBlu,项目名称:cm11_kernel_htc_msm8974a3ul,代码行数:67,



注:本文中的user_disable_single_step函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ user_find_named函数代码示例
C++ userToDeviceCoordinates函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。