From: openocd-gerrit <ope...@us...> - 2024-06-17 14:05:50
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via c5358c84ad0d3e7497498e0457cec7785f72910a (commit) from 4892e32294c6ea4cf53251adb81dee4e85aee0b0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c5358c84ad0d3e7497498e0457cec7785f72910a Author: Marc Schink <de...@za...> Date: Sun Jun 2 14:39:36 2024 +0100 target: Do not use LOG_USER() for error messages Use LOG_TARGET_ERROR() to print the error messages and additionally add a reference to the related target. Change-Id: I06722f3911ef4034fdd05dc9b0e2571b01b657a4 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/8314 Reviewed-by: Tomas Vanek <va...@fb...> Tested-by: jenkins diff --git a/src/target/target.c b/src/target/target.c index 7d4947a6e..1f4817d5c 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2997,14 +2997,14 @@ static int handle_target(void *priv) target_call_event_callbacks(target, TARGET_EVENT_GDB_HALT); } if (target->backoff.times > 0) { - LOG_USER("Polling target %s failed, trying to reexamine", target_name(target)); + LOG_TARGET_ERROR(target, "Polling failed, trying to reexamine"); target_reset_examined(target); retval = target_examine_one(target); /* Target examination could have failed due to unstable connection, * but we set the examined flag anyway to repoll it later */ if (retval != ERROR_OK) { target_set_examined(target); - LOG_USER("Examination failed, GDB will be halted. Polling again in %dms", + LOG_TARGET_ERROR(target, "Examination failed, GDB will be halted. Polling again in %dms", target->backoff.times * polling_interval); return retval; } @@ -4691,9 +4691,8 @@ void target_handle_event(struct target *target, enum target_event e) if (retval != JIM_OK) { Jim_MakeErrorMessage(teap->interp); - LOG_USER("Error executing event %s on target %s:\n%s", + LOG_TARGET_ERROR(target, "Execution of event %s failed:\n%s", target_event_name(e), - target_name(target), Jim_GetString(Jim_GetResult(teap->interp), NULL)); /* clean both error code and stacktrace before return */ Jim_Eval(teap->interp, "error \"\" \"\""); ----------------------------------------------------------------------- Summary of changes: src/target/target.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |