This is an automated email from Gerrit.

"Tormod Volden <[email protected]>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9197

-- gerrit

commit ce4982837f952375c0edd1132778d459545c94e2
Author: Tormod Volden <[email protected]>
Date:   Sat Nov 1 21:41:37 2025 +0100

    rtt: Extend search length to ID length
    
    If you know exactly where the control block is located, it is tempting
    to specify a short search range. However, if the range is shorter than
    the control block ID, it will never be found. For convenience, expand
    the search range if it was specified too short for the ID.
    
    Change-Id: Id1377d5e29af118f6d80e6a668e262a8380513b1
    Signed-off-by: Tormod Volden <[email protected]>

diff --git a/src/rtt/rtt.c b/src/rtt/rtt.c
index 3c7a966a79..1247c5a6b5 100644
--- a/src/rtt/rtt.c
+++ b/src/rtt/rtt.c
@@ -94,6 +94,11 @@ int rtt_setup(target_addr_t address, size_t size, const char 
*id)
                return ERROR_COMMAND_ARGUMENT_INVALID;
        }
 
+       if (size < id_length) {
+               LOG_ERROR("rtt: Extending search to ID length");
+               size = id_length;
+       }
+
        rtt.addr = address;
        rtt.size = size;
        strncpy(rtt.id, id, id_length + 1);

-- 

Reply via email to