target/arm_cti: add debug message when an incorrect CTI register name is used 16/4816/2
authorTarek BOCHKATI <tarek.bouchkati@gmail.com>
Thu, 20 Dec 2018 18:33:26 +0000 (19:33 +0100)
committerMatthias Welwarsky <matthias@welwarsky.de>
Thu, 27 Dec 2018 12:47:35 +0000 (12:47 +0000)
the patch also contains some typo fixes

Change-Id: Ia4267036068455144cdcbfdffed15518d48f445e
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/4816
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/target/arm_cti.c

index dcaf21e..df60372 100644 (file)
@@ -216,6 +216,8 @@ static int cti_find_reg_offset(const char *name)
                if (!strcmp(name, cti_names[i].label))
                        return cti_names[i].offset;
        }
+
+       LOG_ERROR("unknown CTI register %s", name);
        return -1;
 }
 
@@ -297,7 +299,7 @@ COMMAND_HANDLER(handle_cti_write)
        uint32_t value;
 
        if (CMD_ARGC != 2) {
-               Jim_SetResultString(interp, "Wrong numer of args", -1);
+               Jim_SetResultString(interp, "Wrong number of args", -1);
                return ERROR_FAIL;
        }
 
@@ -320,7 +322,7 @@ COMMAND_HANDLER(handle_cti_read)
        uint32_t value;
 
        if (CMD_ARGC != 1) {
-               Jim_SetResultString(interp, "Wrong numer of args", -1);
+               Jim_SetResultString(interp, "Wrong number of args", -1);
                return ERROR_FAIL;
        }