You can use the func command to navigate to a function. To navigate to a function, type the command func followed by the function name. For example:
(dbx) func adjust_speed |
The func command by itself echoes the current function.
For more information, see func Command
If you try to navigate to a C++ member function with an ambiguous name or an overloaded function name, a list is displayed, showing all functions with the overloaded name. Type the number of the function you want to navigate. If you know which specific class a function belongs to, you can type the class name and function name. For example:
(dbx) func block::block |
If multiple symbols are accessible from the same scope level, dbx prints a message reporting the ambiguity.
(dbx) func main (dbx) which C::foo More than one identifier ’foo’. Select one of the following: 0) Cancel 1) ”a.out”t.cc”C::foo(int) 2) ”a.out”t.cc”C::foo() >1 ”a.out”t.cc”C::foo(int) |
In the context of the which command, choosing from the list of occurrences does not affect the state of dbx or the program. Whichever occurrence you choose, dbx echoes the name.