In most cases, the debugger works with one specific function at a time. In the case of overloaded function names, you must specify the desired overloaded function. Following are two ways to resolve references to overloaded function names, both under the control of the $overloadmenu debugger variable (the default setting of this debugger variable is 1):
Choose the correct reference from a selection menu.
If the $overloadmenu variable is set to 1 (the default), whenever you specify a function name that is overloaded, a menu appears with all the possible functions; you must select from this menu. In this example, a breakpoint is set in foo, which is overloaded:
(idb) set $overloadmenu = 1
(idb) stop in C::foo
Select from
----------------------------------------------------
1 int C::foo(double*)
2 void C::foo(float)
3 void C::foo(int)
4 void C::foo(void)
5 None of the above
----------------------------------------------------
1
[#10: stop in int C::foo(double*)]
Enter the function name with its full type signature.
If you prefer this method, set the $overloadmenu variable to 0. To see the possible type signatures for the overloaded function, first display all the declarations of an overloaded function by using the whatis command.
You cannot select a version of an overloaded function that has a type signature containing ellipsis points (...). Pointers to functions with type signatures that contain the list parameter or ellipsis points are not supported.
Use the specific function type signature to refer to the desired version of the overloaded function. If a function has no parameter, include the void parameter as the function's type signature. In the following example, the function context is set to foo(double *), as foo is overloaded:
(idb) func foo
Error: foo is overloaded
(idb) func foo(double *)
int C::foo(double*) in src/x_overload.cxx line No. 25:
25 int C::foo(double *) { return state;}