Skip to content

Commit 864e134

Browse files
committed
target: read_memory: drop command name from error messages
The error message should not report the command name as it should be already clear from the context. Change-Id: I219e31be808bf6ff1924ce60f3025fb48ed7b125 Signed-off-by: Antonio Borneo <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/8803 Tested-by: jenkins
1 parent 6d13942 commit 864e134

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/target/target.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4448,7 +4448,7 @@ COMMAND_HANDLER(handle_target_read_memory)
44484448
}
44494449

44504450
if (count > 65536) {
4451-
command_print(CMD, "read_memory: too large read request, exceeds 64K elements");
4451+
command_print(CMD, "too large read request, exceeds 64K elements");
44524452
return ERROR_COMMAND_ARGUMENT_INVALID;
44534453
}
44544454

@@ -4457,7 +4457,7 @@ COMMAND_HANDLER(handle_target_read_memory)
44574457
* due to overflow.
44584458
*/
44594459
if ((addr + count * width - 1) < addr) {
4460-
command_print(CMD, "read_memory: memory region wraps over address zero");
4460+
command_print(CMD, "memory region wraps over address zero");
44614461
return ERROR_COMMAND_ARGUMENT_INVALID;
44624462
}
44634463

@@ -4484,13 +4484,13 @@ COMMAND_HANDLER(handle_target_read_memory)
44844484
retval = target_read_memory(target, addr, width, chunk_len, buffer);
44854485

44864486
if (retval != ERROR_OK) {
4487-
LOG_DEBUG("read_memory: read at " TARGET_ADDR_FMT " with width=%u and count=%zu failed",
4487+
LOG_DEBUG("read at " TARGET_ADDR_FMT " with width=%u and count=%zu failed",
44884488
addr, width_bits, chunk_len);
44894489
/*
44904490
* FIXME: we append the errmsg to the list of value already read.
44914491
* Add a way to flush and replace old output, but LOG_DEBUG() it
44924492
*/
4493-
command_print(CMD, "read_memory: failed to read memory");
4493+
command_print(CMD, "failed to read memory");
44944494
free(buffer);
44954495
return retval;
44964496
}

0 commit comments

Comments
 (0)