diff -r 2ee12718a766 -r 9b005a8e6778 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_example_trk.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_example_trk.htm Fri Aug 07 15:50:06 2009 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_example_trk.htm Mon Aug 10 15:21:12 2009 -0500 @@ -1,72 +1,72 @@ - - - - - - -Run Mode Debug Example - - - - -

Run Mode Debug Example (Application TRK)

-

This example shows how to create and build an application and debug it on a device using the Application TRK on-device debug agent. The majority of steps are identical to the ones used to create a program and debug in an emulator, with some minor variations.

-
-

Debugging a Run-mode Project using Application TRK

-
    -
  1. Import the Bld.inf to create a project using the Import wizard
  2. -

    In this example we are importing a project called Music, a complex project that includes several EXEs (MusicPlayer, MusicShop, MusicVisualizer). When we import, we select an ARM target.

    -
  3. Go to the project Properties page and in the Carbide Build Configuration panel specify the PKG file in the SIS Builder tab
  4. -
  5. Build the project (Ctrl+B)
  6. -
  7. Verify that all the binaries built by the project appear in the Executables view.
  8. -

    NOTE The symbolics are automatically loaded for the binaries that appear in the Executables view.

    -
  9. Set breakpoints in the project source files
  10. -

    In this example we will set one breakpoint in two different EXEs. The first is set in the file called MCEngine.cpp (MCServer.exe) and the second is set in MPlayerAppUI.cpp (MusicPlayer.exe).

    -
  11. Click the Debug icon () to launch the New Launch Configuration wizard -
      -
    1. Select the Application TRK Launch Configuration from the Launch Types page, then click Next
    2. -

      -

      Figure 1 - Launch Types page showing selection

      -
    3. If you have more than one executable, select the Main Executable in the Executable Selection page of the wizard, then click Next
    4. -

      For this example we select the musicplayer.exe as the main executable.

      -

      -

      Figure 2 - Executable Selection page showing selection

      -
    5. Select the remote connection to use in the TRK Connection Settings page, then click Next
    6. -

      -

      Figure 3 - TRK Connection Settings page showing selection

      -
    7. Select the SIS file to install in the TRK SIS Selection page if not already populated
    8. -
    -
    -

    -

    Figure 4 - TRK Connection Settings page showing selection

    -
    -
      -
    1. Click Finish
    2. -
      -

      The SISX file is downloaded and authenticated, then the binaries are installed automatically on the phone.

      -
    -
  12. Once the debug session launches, control returns to the Debugger when one of the breakpoints set earlier is hit.
  13. -

    At this point you can debug the program in the Debug perspective. Look at the Breakpoints view to verify that the breakpoints set earlier are resolved. In this case, the breakpoint in the MCServer.exe.

    -

    -

    Figure 5 - Debug perspective showing the resolved breakpoint

    -
  14. Click Resume in the Debug view to hit the breakpoint set in the second EXE
  15. -

    -

    Figure 6 - Debug perspective showing the resolved EXE breakpoint

    -
  16. In the Debug view -
      -
    1. Click Disconnect to leave the application running on the device, OR
    2. -
    3. Click Terminate to stop the application running on the device
    4. -
    -
  17. -
-

In addition, you can click the Symbian OS Data View to examine the processes running on the devise during the debug session.

-
-
Related references
- - - - - + + + + + + +Run Mode Debug Example + + + + +

Run Mode Debug Example (Application TRK)

+

This example shows how to create and build an application and debug it on a device using the Application TRK on-device debug agent. The majority of steps are identical to the ones used to create a program and debug in an emulator, with some minor variations.

+
+

Debugging a Run-mode Project using Application TRK

+
    +
  1. Import the Bld.inf to create a project using the Import wizard
  2. +

    In this example we are importing a project called Music, a complex project that includes several EXEs (MusicPlayer, MusicShop, MusicVisualizer). When we import, we select an ARM target.

    +
  3. Go to the project Properties page and in the Carbide Build Configuration panel specify the PKG file in the SIS Builder tab
  4. +
  5. Build the project (Ctrl+B)
  6. +
  7. Verify that all the binaries built by the project appear in the Executables view.
  8. +

    NOTE The symbolics are automatically loaded for the binaries that appear in the Executables view.

    +
  9. Set breakpoints in the project source files
  10. +

    In this example we will set one breakpoint in two different EXEs. The first is set in the file called MCEngine.cpp (MCServer.exe) and the second is set in MPlayerAppUI.cpp (MusicPlayer.exe).

    +
  11. Click the Debug icon () to launch the New Launch Configuration wizard +
      +
    1. Select the Application TRK Launch Configuration from the Launch Types page, then click Next
    2. +

      +

      Figure 1 - Launch Types page showing selection

      +
    3. If you have more than one executable, select the Main Executable in the Executable Selection page of the wizard, then click Next
    4. +

      For this example we select the musicplayer.exe as the main executable.

      +

      +

      Figure 2 - Executable Selection page showing selection

      +
    5. Select the remote connection to use in the TRK Connection Settings page, then click Next
    6. +

      +

      Figure 3 - TRK Connection Settings page showing selection

      +
    7. Select the SIS file to install in the TRK SIS Selection page if not already populated
    8. +
    +
    +

    +

    Figure 4 - TRK Connection Settings page showing selection

    +
    +
      +
    1. Click Finish
    2. +
      +

      The SISX file is downloaded and authenticated, then the binaries are installed automatically on the phone.

      +
    +
  12. Once the debug session launches, control returns to the Debugger when one of the breakpoints set earlier is hit.
  13. +

    At this point you can debug the program in the Debug perspective. Look at the Breakpoints view to verify that the breakpoints set earlier are resolved. In this case, the breakpoint in the MCServer.exe.

    +

    +

    Figure 5 - Debug perspective showing the resolved breakpoint

    +
  14. Click Resume in the Debug view to hit the breakpoint set in the second EXE
  15. +

    +

    Figure 6 - Debug perspective showing the resolved EXE breakpoint

    +
  16. In the Debug view +
      +
    1. Click Disconnect to leave the application running on the device, OR
    2. +
    3. Click Terminate to stop the application running on the device
    4. +
    +
  17. +
+

In addition, you can click the Symbian OS Data View to examine the processes running on the devise during the debug session.

+
+
Related references
+ + + + +