This is an automated email from Gerrit. "Lucien Buchmann <lucien.buchm...@dufour.aero>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/8909
-- gerrit commit a016d4c29b75bb403198d1cbe3df470519437d4e Author: Lucien Dufour <lucien.buchm...@dufour.aero> Date: Thu May 15 14:31:25 2025 +0200 cortex_a: Use endianness for soft breakpoints Take endianness into account when inserting software breakpoints since, cortex_a target is also used by cortex_r and some MCUs of the architecture start in big-endian by default (e.g. TMS570) This was previously commited by Andrey Smirnov on 2014-07-12 in a similar way. Change-Id: I68b7fe7c4604de67fee2e64fff0fad2691659a58 Signed-off-by: Lucien Dufour <lucien.buchm...@dufour.aero> diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index ee27e1b217..629686ef86 100644 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -1327,18 +1327,18 @@ static int cortex_a_set_breakpoint(struct target *target, uint8_t code[4]; if (breakpoint->length == 2) { /* length == 2: Thumb breakpoint */ - buf_set_u32(code, 0, 32, ARMV5_T_BKPT(0x11)); + target_buffer_set_u16(target, code, (uint16_t) ARMV5_T_BKPT(0x11)); } else if (breakpoint->length == 3) { /* length == 3: Thumb-2 breakpoint, actual encoding is * a regular Thumb BKPT instruction but we replace a * 32bit Thumb-2 instruction, so fix-up the breakpoint * length */ - buf_set_u32(code, 0, 32, ARMV5_T_BKPT(0x11)); + target_buffer_set_u32(target, code, ARMV5_T_BKPT(0x11)); breakpoint->length = 4; } else { /* length == 4, normal ARM breakpoint */ - buf_set_u32(code, 0, 32, ARMV5_BKPT(0x11)); + target_buffer_set_u32(target, code, ARMV5_BKPT(0x11)); } retval = target_read_memory(target, --