Co-debugging with the Tornado debugger

About this task

Before using the Tornado debugger, make sure to compile the generated file using debug flags (normally -g).

To use the Tornado debugger:

Procedure

  1. In Rational® Rhapsody®, connect the application by selecting Code > IDE > Connect.
  2. Download the application by selecting Code > IDE > Download.
  3. Select Code > IDE > Run, or click Run.
  4. In the Animation toolbar, select Go Idle (or Go Step several times) so the tRhp task is created.
    Note: You must run the application before attaching a debugger; otherwise, there are no tasks to which to attach the debugger.
  5. In Tornado, start the debugger by selecting Tools > Debugger.
  6. Attach the debugger to the main thread (tRhp) by selecting Debug > attach.
  7. From the debugger, change directory to the generated code directory (using the cd command in the gdb prompt).
  8. From the debugger, load the symbols of the executable (using the add-symbol-file command at the gdb prompt).

Results

Now you can use gdb to debug the application, set breakpoints, and so on.

Before quitting animation on Rational Rhapsody, you must detach the debugger using Debug > Detach. Failing to detach the debugger might block the session once Rational Rhapsody attempts to unload the image.

Note: Do not download the executable to the target using the debugger. Rational Rhapsody does not properly if you use this method.

Feedback