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/+/8219

-- gerrit

commit f0553c61b2118a459a1ab16cd6bd485db5b1864e
Author: Marc Schink <d...@zapb.de>
Date:   Sun Apr 21 20:45:37 2024 +0200

    target/breakpoints: Use 'uint32_t' for length parameter
    
    Use 'uint32_t' instead of 'int' as data type for 'length'. This data
    type is more suitable and also already used by all internal functions.
    
    Change-Id: I13087287241edec89574aaa428b623cd072aee7e
    Signed-off-by: Marc Schink <d...@zapb.de>

diff --git a/src/target/breakpoints.h b/src/target/breakpoints.h
index 64c0ce2a5a..e99dba90a5 100644
--- a/src/target/breakpoints.h
+++ b/src/target/breakpoints.h
@@ -26,7 +26,7 @@ enum watchpoint_rw {
 struct breakpoint {
        target_addr_t address;
        uint32_t asid;
-       int length;
+       uint32_t length;
        enum breakpoint_type type;
        bool is_set;
        unsigned int number;
diff --git a/src/target/target.c b/src/target/target.c
index 9d958c7942..9cae8c3052 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -3915,24 +3915,24 @@ static int handle_bp_command_list(struct 
command_invocation *cmd)
                if (breakpoint->type == BKPT_SOFT) {
                        char *buf = buf_to_hex_str(breakpoint->orig_instr,
                                        breakpoint->length * 8);
-                       command_print(cmd, "Software breakpoint(IVA): addr=" 
TARGET_ADDR_FMT ", len=0x%x, orig_instr=0x%s",
+                       command_print(cmd, "Software breakpoint(IVA): addr=" 
TARGET_ADDR_FMT ", len=0x%" PRIx32 ", orig_instr=0x%s",
                                        breakpoint->address,
                                        breakpoint->length,
                                        buf);
                        free(buf);
                } else {
                        if ((breakpoint->address == 0) && (breakpoint->asid != 
0))
-                               command_print(cmd, "Context breakpoint: 
asid=0x%8.8" PRIx32 ", len=0x%x, num=%u",
+                               command_print(cmd, "Context breakpoint: 
asid=0x%8.8" PRIx32 ", len=0x%" PRIx32 ", num=%u",
                                                        breakpoint->asid,
                                                        breakpoint->length, 
breakpoint->number);
                        else if ((breakpoint->address != 0) && 
(breakpoint->asid != 0)) {
-                               command_print(cmd, "Hybrid breakpoint(IVA): 
addr=" TARGET_ADDR_FMT ", len=0x%x, num=%u",
+                               command_print(cmd, "Hybrid breakpoint(IVA): 
addr=" TARGET_ADDR_FMT ", len=0x%" PRIx32 ", num=%u",
                                                        breakpoint->address,
                                                        breakpoint->length, 
breakpoint->number);
                                command_print(cmd, "\t|--->linked with 
ContextID: 0x%8.8" PRIx32,
                                                        breakpoint->asid);
                        } else
-                               command_print(cmd, "Hardware breakpoint(IVA): 
addr=" TARGET_ADDR_FMT ", len=0x%x, num=%u",
+                               command_print(cmd, "Hardware breakpoint(IVA): 
addr=" TARGET_ADDR_FMT ", len=0x%" PRIx32 ", num=%u",
                                                        breakpoint->address,
                                                        breakpoint->length, 
breakpoint->number);
                }

-- 

Reply via email to