Show or change the current function scope.
func [func_name | num ]
func_name |
The name of the function to which you want to change the function scope. |
num |
An integer, the debugger moves to the frame at level n. |
This command shows or changes the current frame.
To change the current frame to the call frame of a function in the call stack, specify the func_name parameter. If the function occurs more than once in the call stack, the most-recently entered call frame for that function becomes the current call frame.
To display the name of the current call frame's function, use the func command without any parameters.
To return to the current function scope, which is the default, use the command func 0.
If no frames are available to select, the debugger context is set to the static context of the named function. The current scope and current language are set based on that function. Types and static variables local to that function are now visible and can be evaluated.
To move the debugger to a specific frame level, specify that level with num. This is equivalent to entering up n at the level 0 function.
You cannot have the scope set to a function and a class simultaneously. Setting the scope to a class moves the scope away from the function scope and vice versa. To return to the default (current function) scope, use the command func 0.
Class B is a context outside B::doAFoobar. The following example sets the context at the function doAFoobar, a function member of the class B:
(idb) func B::doAFoobar
Copyright © 2001-2011, Intel Corporation. All rights reserved.