The Symbol Browser 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. You
can use the Symbol Browser to drill down to see the size and location of each part
of your program. The way symbols are sorted
and grouped is saved between runs; so, when you rebuild an application, SEGGER Embedded Studio
automatically updates the Symbol Browser so you can see the effect of your changes
on the memory layout of your program.

The main part of the Symbol Browser displays each symbol (both
external and static) that is linked into an application. SEGGER Embedded Studio displays
the following icons to the left of each symbol:

Icon

Description

Private Equate A private symbol 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.

Choosing what to show

To activate the Symbol Browser window:

Choose View > Symbol Browser or press Ctrl+Alt+Y.

You can choose to display the following fields for 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 addresses 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, of the code or data item. 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, Size
is calculated as the difference between the start and end addresses of the range.
If a symbol has no range, the size column is blank.

Section: The section in which the symbol is defined. If the symbol is not defined
within a section, the Section column is 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 blank.

Frame Size: The amount of stack space used by a call to the function symbol. If the source file
that defines the symbol is compiled with debugging information turned off, frame size information
is not available and the Type column is blank.

Initially the Range and Size columns are shown in the Symbol Browser.
To select which columns to display, use the Field Chooser button on
the Symbol Browser toolbar.

To select the fields to display:

Click the Field Chooser button on the Symbol Browser
toolbar.

Select the fields you wish to display and deselect the fields you
wish to hide.

Organizing and sorting symbols

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

To group symbols by section:

On the Symbol Browser toolbar, click the arrow next to
the Cycle Grouping button.

From the pop-up menu, choose Group By Section.

The Cycle Grouping icon will change to indicate
that the Symbol Browser is grouping symbols by section.

When you group symbols by type, each
symbol is classified as one of the following:

An Equate has an absolute value and is not defined
as relative to, or inside, a section.

A Function is defined by a high-level
code sequence.

A Variable is defined by a high-level data declaration.

A Label is defined by an assembly language
module. Label is also used when high-level modules are compiled
with debugging information turned off.

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

To group symbols by type:

On the Symbol Browser toolbar, click the arrow next to
the Cycle Grouping button.

Choose Group By Type from the pop-up menu.

The Cycle Grouping icon will change to indicate
that the Symbol Browser is grouping symbols by type.

To group symbols by source file:

On the Symbol Browser toolbar, click the arrow next to
the Cycle Grouping button.

Choose Group By Source File.

The Cycle Grouping icon will change to indicate
that the Symbol Browser is grouping symbols by source file.

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

To list symbols alphabetically:

On the Symbol Browser toolbar, click the arrow next to
the Cycle Grouping button.

Choose Sort Alphabetically.

The Cycle Grouping icon will change to indicate
that the Symbol Browser is grouping symbols alphabetically.

Filtering and finding symbols

When you're dealing with big projects with hundreds, or even thousands,
of symbols, a way to filter those symbols in order to isolate just the
ones you need is very useful. The Symbol Browser's toolbar provides an editable combobox} you can use to specify the symbols you'd like
displayed. You can type ‘*’ 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. Note: 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.

To display symbols that start with a common prefix:

Type the desired prefix text into the combo box, optionally followed by
a "*".

For instance, 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, because it is implied.

To display symbols that end with a common suffix:

Type ‘*’ into the combo box, followed by the required suffix.

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

When 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
a symbol's definition using the Go To Definition button.

To jump to the definition of a symbol:

Select the symbol from the list of symbols.

On the Symbol Browser toolbar, click Go To Definition.

—or—

Right-click the symbol in the list of symbols.

Choose Go To Definition from the shortcut menu.

Watching symbols

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:

In the Symbol Browser, right-click the symbol you wish
to add to the Watch window.

On the shortcut menu, choose Add To Watch.

To add a symbol to the Memory window:

In the Symbol Browser, right-click the symbol you wish
to add to the Memory window.

Choose Locate Memory from the shortcut menu.

Using size information

Here are a few common ways to use the Symbol Browser:

What function uses the most code space? What requires the most data space?

Choose View > Symbol Browser or press Ctrl+Alt+Y.

In the Grouping button menu on the Symbol Browser toolbar, select Group By Type.

Ensure the Size field is checked in the Field Chooser button's menu.

Ensure that the filter on the Symbol Browser toolbar is empty.

Click on the Size field in the header to sort by data size.

The sizes of variables and of functions are shown in separate lists.

What's the overall size of my application?

Choose View > Symbol Browser or press Ctrl+Alt+Y.

In the Grouping button menu on the Symbol Browser toolbar, select Group By Section.

Ensure the Range and Size fields are checked in the Field Chooser button's menu.