The Symbol Browser window shows useful information about your linked application and complements the information displayed in the Project Explorer window. You can select different ways to filter and group the information in the symbol browser to provide an at-a-glance overview of your application as a whole. You can use the symbol browser to drill down to see how big each part of your program is and where it’s placed. The way that symbols are sorted and grouped is saved between runs. When you rebuild an application, CrossStudio automatically updates the symbol browser so you can see the effect your changes are making to the memory layout of your program.

Symbol browser user interface

The symbol browser is divided into a tool bar and the main symbol display.

Symbol Browser tool bar
Button Description
Groups symbols by source file name.
Groups symbols by symbol type (equates, functions, labels, sections, and variables)
Groups symbols by the section that they are defined in.
Moves the cursor to the statement that defined the symbol.
Chooses the columns to display in the symbol browser.
Symbol Browser display

The main part of the symbol browser displays each symbol (both external and static) that the is linked into an application. CrossStudio displays these icons to the left of each symbol:

Icon Description
Private Equate  A private symbol that is not defined relative to a section.
Public Equate  A public symbol that is not defined relative to a section.
Private Function  A private function symbol.
Public Function  A public function symbol.
Private Label  A private data symbol, defined relative to a section.
Public Label  A public data symbol, defined relative to a section.
Section  A program section.
Symbol browser columns

You can choose to display the following fields against each symbol:

Value
The value of the symbol. For labels, code, and data symbols this will be the address of the symbol. For absolute or symbolic equates, this will be the value of the symbol.
Range
The range of addresses the code or data item covers. For code symbols that correspond to high-level functions, the range is the range of addresses used for that function's code. For data addreses that correspond to high-level static or extern variables, the range is the range of addresses used to store that data item. These ranges are only available if the corresponding source file was compiled with debugging information turned on: if no debugging information is available, the range will simply be the first address of the function or data item.
Size
The size, in bytes, that the code or data item covers. The Size column is derived from the Range of the symbol: if the symbol corresponds to a high-level code or data item and has a range, then Size is calculated as the difference between the start and end address of the range. If a symbol has no range, the size column is left blank.
Section
The section in which the symbol is defined. If the symbol is not defined within a section, the Section column is left blank.
Type
The high-level type for the data or code item. If the source file that defines the symbol is compiled with debugging information turned off, type information is not available and the Type column is left blank.
Showing the Symbol Browser window

To display the Symbol Browser window if it is hidden, do one of the following:

—or—

—or—

Configuring the Symbol Browser

Choosing fields to display

Initially the Range and Size columns are shown in the symbol browser. You can select which columns to display using the Field Chooser on the Symbol Browser tool bar.

To select the fields to display in the Symbol Browser, do one of the following:

—or—

Grouping symbols by section

When you group symbols by section, each symbol is grouped underneath the section that it is defined in. Symbols that are absolute or are not defined within a section are grouped beneath “(No Section)”.

To group symbols by section, do the following:

—or—

The Cycle Grouping tool button icon will change to indicate that the symbol browser is now grouping symbols by section.

Grouping symbols by type

When you group symbols by type, each symbol is grouped underneath the type of symbol that it is. Each symbol is classified as one of the following:

To group symbols by source type, do the following:

—or—

The Cycle Grouping tool button icon will change to indicate that the symbol browser is now grouping symbols by type.

Grouping symbols by source file

When you group symbols by source file, each symbol is grouped underneath the source file that it is defined in. Symbols that are absolute, are not defined within a source file, or are compiled with without debugging information, are grouped beneath “(Unknown)”.

To group symbols by source file, do one of the following:

—or—

The Cycle Grouping tool button icon will change to indicate that the symbol browser is now grouping symbols by source file.

Sorting symbols alphabetically

When you sort symbols alphabetically, all symbols are displayed in a single list in alphabetical order.

To group symbols alphabetically, do one of the following:

—or—

The Cycle Grouping tool button icon will change to indicate that the symbol browser is now grouping symbols alphabetically.

Filtering, finding, and watching symbols

When you’re dealing with big projects with hundreds, or even thousands, of symbols, a way to filter the display of those symbols and drill down to the ones you need is very useful. The symbol browser provides an editable combo box in the toolbar which you can use to specify the symols you’d like displayed. The symbol browser uses “*” to match a sequence of zero or more characters and “?” to match exactly one character.

The symbols are filtered and redisplayed as you type into the combo box. Typing the first few characters of a symbol name is usually enough to narrow the display to the symbol you need. One thing to note is that the C compiler prefixes all high-level language symbols with an underscore character, so the variable extern int u or the function void fn(void) have low-level symbol names _u and _fn. The symbol browser uses the low-level symbol name when displaying and filtering, so you must type the leading underscore to match high-level symbols.

Finding symbols with a common prefix

To display symbols that start with a common prefix, do the following:

For instamce, to display all symbols that start with “i2c_”, type “i2c_” and all matching symbols are displayed—you don’t need to add a trailing “*” in this case as it is implied.

Finding symbols with a common suffix

To display symbols that end with a common suffix, do the following:

For instamce, to display all symbols that end in “_data”, type “*_data” and all matching symbols are displayed—in this case the leading “*” is required.

Jumping to the definition of a symbol

Once you have found the symbol you’re interested in and your source files have been compiled with debugging information turned on, you can jump to the definition of a symbol using the Go To Definition tool button.

To go to the definition of a symbol, do one of the following:

—or—

Adding symbol to watch and memory windows

If a symbol’s range and type is known, you can add it to the most recently opened watch window or memory window.

To add a symbol to the watch window, do the following:

To add a symbol to the memory window, do the following:

Working with the Symbol Browser

Here are a few common ways to use the symbol browser:

What function takes up the most code space or what takes the most data space?
What's the overall size of my application?