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.