8.8. Examining DataΒΆ

The Workbench debugger provides a tabbed dialog presenting various views for inspecting local variables, watchpoints, and registers. These tabs provide a variety of different tools for exploring information about the state of your halted application. Note that you must halt the application’s execution before you can examine the values of objects.

1

Special Note

In this version of the Workbench debugger, the names of Ada objects declared within packages must be entered in a particular format for the debugger to recognize them and display their values. Objects declared in other declarative parts do not have this issue. Currently, these objects are displayed in the Expressions view.

Specifically, any dots in the package name must be replaced by two consecutive underscores and all lowercase letters must be used. For example, a variable named Alpha declared in package Ownship would be referenced as “Ownship.Alpha” within Ada source code. Within the debugger data views, the variable must be referred to as “ownship__alpha” for the name to be recognized. Wind River is working to remove this restriction.

For convenience, you can simply right-click on these objects in the source editor and select the “Add Watch Expression...” option. The encoded name of the selected entity will be displayed automatically in a dialog window. After clicking on OK, you will see the corresponding expression has been added to the Expression view. From there, you will be able to browse the content of your object in that view.

In addition, you must set an environment variable to enable viewing the values of Ada variables with these names. Specifically, set DFW_ENABLE_ADA_SYMBOL_SEARCH to 1. You need only set this environment variable once, as long as it does not become undefined later.

Note that Workbench provides additional optional views through the Window -> Show View menu item.