8.3. Creating A Debug Launch ConfigurationΒΆ

Workbench allows you to maintain configuration options and preferences from debug session to session via the “debug configuration” mechanism. To debugging under Workbench you must create such a configuration.

To create a debug launch configuration you must invoke the appropriate dialog. There are a number of ways to do so. For example, the contextual menu for project nodes in the explorer is tailored for the kind of project selected. With a DKM project, you can right-click on the project node and select “Debug VxWorks Kernel Task”.

contextual\_menu\_debug\_kernel\_task.png

Alternatively, you could select “Debug Configurations...” from under the “Run” menu or select it via the toolbar “Debug” button. The project node contextual menu approach may be the most convenient because it will fill in some of the required fields automatically. In any case, the debug configuration manager dialog will appear:

In this case we are debugging a kernel task, so double click on “VxWorks Kernel Task”. This will bring up a tabbed dialog allowing you to configure your session. Initially there will be no entry point so that will be reflected in the configuration name:

Note that the previously configured and connected “vxsim0” has been selected for the launch context.

The error indicates that the missing “Entry Point” is not yet specified. This is the Ada main program, unless you want to debug the library units’ elaboration. You can either manually enter the main program name or browse for it. It is always necessary to specify the name of the procedure you expect to be called at program startup.

Note that when using Workbench 3.3.2, 3.3.2.1, and 3.3.2.2, the entry point for an Ada application is the debug symbol ada_main__<main subprogram name>, rather than simply the main subprogram name (in lowercase) as for previous versions. This applies to the ``entry point’’ value specified for a Workbench application or debug launcher, and to uses of the entry point in the host shell. It does not apply to the target shell.

WRS has corrected this issue in Workbench 3.3.3. (See Wind River defect WIND00355069 for details.) A patch is available on their online support site for the versions mentioned above:

https://support.windriver.com/olsPortal/faces/maintenance/downloadDetails.jspx?contentId=039960

Its name is “Workbench 3.2.2.2 Patch 00350276 for Windows Hosts’‘.

The main procedure name in our example is “sdc”. The following figure shows the dialog that is invoked when the “Browse” button is pressed. We have entered “sd” to filter out the rest of the names.

cross\_debug\_select\_entry\_point\_dialog

For many applications these settings will suffice. However, you can also apply additional settings and switches.

For example, it may be necessary to increase the amount of stack specified for your application. You can do that here in the “Advanced” panel. You can also select the way you want tasks to behave when breakpoints are hit via the “Target Mode” control.

cross\_debug\_dialog\_advanced\_panel

You will likely find it useful to select the “Break on Entry” option for the “Debug” panel. Likewise, having the debugger automatically attach to tasks is convenient for multitasking applications.

In the screen shot below, a typical debug configuration has been configured: