helper: fix arm11 help text

This fixes a long standing bug: see Trac #4
Increased help text recursion limit and added LOG_DEBUG so we can
catch future errors like this.

Change-Id: I5fac95c4486eaddaf1e88a27ecb1835168f87711
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/291
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
This commit is contained in:
Spencer Oliver 2011-12-20 16:15:52 +00:00
parent 7e2257663d
commit 4c11906241
1 changed files with 5 additions and 3 deletions

View File

@ -927,8 +927,10 @@ static COMMAND_HELPER(command_help_show, struct command *c, unsigned n,
return -ENOMEM; return -ENOMEM;
} }
if (++n >= 2) if (++n > 5) {
return ERROR_OK; LOG_ERROR("command recursion exceeded");
return ERROR_FAIL;
}
return CALL_COMMAND_HANDLER(command_help_show_list, return CALL_COMMAND_HANDLER(command_help_show_list,
c->children, n, show_help, match); c->children, n, show_help, match);