Skip to content

Commit d5adab6

Browse files
zapb-0borneoa
authored andcommitted
target/breakpoints: Fix 'orig_instr' output
The 'orig_instr' information of software breakpoints is incorrect because buf_to_hex_str() expects the length of the buffer to be converted in bits and not bytes. Change-Id: I9a9ed383a8c25200d461b899749d5259ee4c6e3d Signed-off-by: Marc Schink <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/8218 Reviewed-by: Antonio Borneo <[email protected]> Tested-by: jenkins
1 parent 5b3d503 commit d5adab6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/target/target.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3921,7 +3921,7 @@ static int handle_bp_command_list(struct command_invocation *cmd)
39213921
while (breakpoint) {
39223922
if (breakpoint->type == BKPT_SOFT) {
39233923
char *buf = buf_to_hex_str(breakpoint->orig_instr,
3924-
breakpoint->length);
3924+
breakpoint->length * 8);
39253925
command_print(cmd, "Software breakpoint(IVA): addr=" TARGET_ADDR_FMT ", len=0x%x, orig_instr=0x%s",
39263926
breakpoint->address,
39273927
breakpoint->length,

0 commit comments

Comments
 (0)