Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34dd909a authored by Todd Poynor's avatar Todd Poynor Committed by Amit Pundir
Browse files

ANDROID: ARM: kgdb: ignore breakpoint instructions from user mode



Avoid conflicts with user mode usage of the same instructions, as with
Clang -ftrapv.

Change-Id: I12d1c6d8f94376bfd2503cb0be843d7e478fb6ea
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
parent 992dbb2a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -141,6 +141,8 @@ int kgdb_arch_handle_exception(int exception_vector, int signo,

static int kgdb_brk_fn(struct pt_regs *regs, unsigned int instr)
{
	if (user_mode(regs))
		return -1;
	kgdb_handle_exception(1, SIGTRAP, 0, regs);

	return 0;
@@ -148,6 +150,8 @@ static int kgdb_brk_fn(struct pt_regs *regs, unsigned int instr)

static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int instr)
{
	if (user_mode(regs))
		return -1;
	compiled_break = 1;
	kgdb_handle_exception(1, SIGTRAP, 0, regs);