Sun Studio 12 Update 1: Debugging a Program With dbx

Printing a List of Occurrences of a Symbol

To print a list of all the occurrences of a specified symbol, use whereis symbol, where symbol can be any user-defined identifier. For example:

(dbx) whereis table
forward: `Blocks``table
function: `Blocks``table::table(char*, int, int, const point&)
class: `Blocks``table
class: `Blocks``table
variable:       ``hsearch.c`table

The output includes the name of the loadable objects where the program defines symbol, as well as the kind of entity each object is: class, function, or variable.

Because information from the dbx symbol table is read in as it is needed, the whereis command registers only occurrences of a symbol that are already loaded. As a debugging session gets longer, the list of occurrences can grow (see Debugging Information in Object Files and Executables).

For more information, see whereis Command.