Set a limitation on the maximum number of recursion levels a user-defined command may have.
set max-user-call-depth num
num |
The maximum number of recursion levels. |
This command sets the maximum number of recursion levels a user-defined command may have. If the number of recursion levels in a user-defined command exceeds num, the debugger assumes an infinite recursion and aborts the command.
The following example starts by creating a user-defined command named ff.
(idb) define ff Type commands for definitions of "ff". End with a line saying just "end". >p $deep >if $deep > 10 >p "Got to 11" >else >set $deep = $deep + 1 >ff >end >end (idb) set $deep = 0
TThe user-defined command stack gets to 11 deep.
(idb) ff $85 = 0 $86 = 1 $87 = 2 $88 = 3 $89 = 4 $90 = 5 $91 = 6 $92 = 7 $93 = 8 $94 = 9 $95 = 10 $96 = 11 $97 = Got to 11 (idb) set max-user-call-depth 4 (idb) set $deep = 0 (idb) ff $98 = 0 $99 = 1 $100 = 2 $101 = 3 Max user call depth exceeded -- command aborted. (idb)
Copyright © 1996-2010, Intel Corporation. All rights reserved.