Commit e6fb952e authored by He Sheng's avatar He Sheng Committed by guzitao
Browse files

sw64: handle kprobe breakpoint if CONFIG_KPROBES=y

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG



--------------------------------

If CONFIG_KPROBES is not set, kprobe breakpoint instructions are
treated as illegal instructions.

Signed-off-by: default avatarHe Sheng <hesheng@wxiat.com>
Reviewed-by: default avatarCui Wei <cuiwei@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent 1a133985
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -261,12 +261,14 @@ do_entIF(unsigned long inst_type, struct pt_regs *regs)

	case IF_OPDEC:
		switch (inst) {
#ifdef CONFIG_KPROBES
		case BREAK_KPROBE:
			if (notify_die(DIE_BREAK, "kprobe", regs, 0, 0, SIGTRAP) == NOTIFY_STOP)
				return;
		case BREAK_KPROBE_SS:
			if (notify_die(DIE_SSTEPBP, "single_step", regs, 0, 0, SIGTRAP) == NOTIFY_STOP)
				return;
#endif
#ifdef CONFIG_UPROBES
		case UPROBE_BRK_UPROBE:
			if (notify_die(DIE_UPROBE, "uprobe", regs, 0, 0, SIGTRAP) == NOTIFY_STOP)