From 5d00fd9d1dc504335dd71e474a3d61dec7696c40 Mon Sep 17 00:00:00 2001 From: Matthias Welwarsky Date: Wed, 26 Oct 2016 17:32:43 +0200 Subject: aarch64: fix software breakpoints when in aarch32 state Use the correct opcode for Aarch32 state, both for the breakpoint instruction itself and the cache handling functions. Change-Id: I975fa67b1e577b54f5c672a01d516419c6a614b2 Signed-off-by: Matthias Welwarsky Reviewed-on: http://openocd.zylin.com/3981 Tested-by: jenkins Reviewed-by: Paul Fertser --- src/target/aarch64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/target/aarch64.c') diff --git a/src/target/aarch64.c b/src/target/aarch64.c index 0a6b67f..833dc7a 100644 --- a/src/target/aarch64.c +++ b/src/target/aarch64.c @@ -915,7 +915,7 @@ static int aarch64_set_breakpoint(struct target *target, } else if (breakpoint->type == BKPT_SOFT) { uint8_t code[4]; - buf_set_u32(code, 0, 32, ARMV8_HLT(0x11)); + buf_set_u32(code, 0, 32, armv8_opcode(armv8, ARMV8_OPC_HLT)); retval = target_read_memory(target, breakpoint->address & 0xFFFFFFFFFFFFFFFE, breakpoint->length, 1, -- cgit v1.1