This is an automated email from Gerrit.

"zapb <d...@zapb.de>" just uploaded a new patch set to Gerrit, which you can 
find at https://review.openocd.org/c/openocd/+/8218

-- gerrit

commit 6c0749a3d4a855e89275580527e487491a1c03b5
Author: Marc Schink <d...@zapb.de>
Date:   Sun Apr 21 20:00:28 2024 +0200

    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 <d...@zapb.de>

diff --git a/src/target/target.c b/src/target/target.c
index 45698a66c5..9d958c7942 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -3914,7 +3914,7 @@ static int handle_bp_command_list(struct 
command_invocation *cmd)
        while (breakpoint) {
                if (breakpoint->type == BKPT_SOFT) {
                        char *buf = buf_to_hex_str(breakpoint->orig_instr,
-                                       breakpoint->length);
+                                       breakpoint->length * 8);
                        command_print(cmd, "Software breakpoint(IVA): addr=" 
TARGET_ADDR_FMT ", len=0x%x, orig_instr=0x%s",
                                        breakpoint->address,
                                        breakpoint->length,

-- 

Reply via email to