target/arm_tpiu: Make error message easier to understand
authorMarc Schink <dev@zapb.de>
Tue, 22 Jun 2021 09:47:26 +0000 (11:47 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 5 Mar 2022 13:23:00 +0000 (13:23 +0000)
Change-Id: Idddc31e34a67641c32d041c89d01fe2126ec5ddb
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/6328
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/target/arm_tpiu_swo.c

index 024521364dba1b83613e2396b174dcb8d0e95edc..387ad9e9e193ddc435e1a05dc679629438dc79fb 100644 (file)
@@ -886,7 +886,8 @@ static int arm_tpiu_swo_create(Jim_Interp *interp, struct arm_tpiu_swo_object *o
        /* does this command exist? */
        cmd = Jim_GetCommand(interp, Jim_NewStringObj(interp, obj->name, -1), JIM_NONE);
        if (cmd) {
-               Jim_SetResultFormatted(interp, "Command: %s Exists", obj->name);
+               Jim_SetResultFormatted(interp, "cannot create TPIU object because a command with name '%s' already exists",
+                       obj->name);
                return JIM_ERR;
        }