3.4.2 Debugging with GDB at the source level

How to debug at the source level with GNU Debugger on Linux with System Canvas.

Note

  • An alternative way to debug a CADI shared library is with the Model Shell executable or Model Debugger executable, using a Linux shell to start it.
  • To debug ISIM targets, start a GDB session directly from System Canvas by selecting Launch Host Debugger from the Project menu. You can specify command line arguments on the Applications page of the Preferences dialog.
Use GDB to perform LISA+ source-level debugging on Linux.

Prerequisites

Use GDB version 6.2 or higher.

Procedure

  1. Start a GDB session with Model Debugger as the executable by typing gdb modeldebugger.exec in the console.
  2. Type run at the GDB prompt to start Model Debugger.
    You can load the model in the same step by adding the name of the model library, for example:
    run cadi_system_Linux-Debug-GCC-4.1.so
    
    Model Debugger starts and the Configure Model Parameters dialog opens.
  3. Configure any required parameters for the target, then click OK. The Select Targets dialog opens. The ARM processor is selected by default.
  4. Select any additional targets to load. Model Debugger creates a separate window for each target. Click OK to close the dialog.
  5. Load the applications to the targets that execute software:
    • For a single target, Model Debugger displays a dialog prompting for the application.
    • For more than one target, load the application to the targets in each debug view separately by selecting Load Application from the File menu.

    Note

    Alternatively, select the application when Model Debugger starts by adding command line option -a in line with the name of the target and application file:
    run cadi_system_Linux-Debug-GCC-4.1.so -a targetName1=application1 -a targetName2=application2
    
  6. GDB is now ready to debug the model source code.
Non-ConfidentialPDF file icon PDF versionARM DUI0370S
Copyright © 2007-2014 ARM. All rights reserved.