This is an automated email from Gerrit. "Tomas Vanek <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9242
-- gerrit commit b8637104b8e88dfae33edfd64a714ffdabddc888 Author: Tomas Vanek <[email protected]> Date: Wed Nov 19 07:56:40 2025 +0100 target, gdb_server: allow GDB compare-sections without checksum_memory Some targets do not have checksum_memory() method implemented. Without this patch GDB 'compare-sections' fails on such target because OpenOCD propagates non implemented method as a general error. GDB compare-sections command can work-around not implemented qCrc remote protocol command by simple memory read. Return qCrc reply as it were not implemented in the case the target misses checksum_memory() method implementation. GDB 'compare-sections' is slow but works. Change-Id: I804605d31310698445b3ffb5e3fcad1fc43a5579 Signed-off-by: Tomas Vanek <[email protected]> diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 486080bbd1..567da53dd3 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2881,6 +2881,8 @@ static int gdb_query_packet(struct connection *connection, if (retval == ERROR_OK) { snprintf(gdb_reply, 10, "C%8.8" PRIx32, checksum); gdb_put_packet(connection, gdb_reply, 9); + } else if (retval == ERROR_NOT_IMPLEMENTED) { + gdb_put_packet(connection, "", 0); } else { retval = gdb_error(connection, retval); if (retval != ERROR_OK) diff --git a/src/target/target.c b/src/target/target.c index 3d807ba35a..ac4fded09a 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2485,7 +2485,7 @@ int target_checksum_memory(struct target *target, target_addr_t address, uint32_ } if (!target->type->checksum_memory) { LOG_ERROR("Target %s doesn't support checksum_memory", target_name(target)); - return ERROR_FAIL; + return ERROR_NOT_IMPLEMENTED; } retval = target->type->checksum_memory(target, address, size, &checksum); --
