int type_name_len = strlen(type_name);
int e = ERROR_OK;
- /* At least we need to specify 4 parameters: name, number, type and gdb_feature,
- * which means there should be 8 arguments */
- if (goi.argc < 8) {
+ /* At least we need to specify 4 parameters: name, number and gdb_feature,
+ * which means there should be 6 arguments. Also there can be additional paramters
+ * "-type <type>", "-g" and "-core" or "-bcr" which makes maximum 10 parameters. */
+ if (goi.argc < 6 || goi.argc > 10) {
free_reg_desc(reg);
Jim_SetResultFormatted(goi.interp,
- "Should be at least 8 argnuments: -name <name> "
- "-num <num> -type <type> -feature <gdb_feature>.");
+ "Should be at least 6 argnuments and not greater than 10: "
+ " -name <name> -num <num> -feature <gdb_feature> "
+ " [-type <type_name>] [-core|-bcr] [-g].");
return JIM_ERR;
}