The Vitis Unified System Debugger uses the Vitis hw_server as the underlying debug engine. The Vitis software platform translates each user interface action into a sequence of Target Communication Framework (TCF) commands. It then processes the output from System Debugger to display the current state of the program being debugged. It communicates to the processor on the hardware using Vitis hw_server.
The debug workflow is described in the following figure.
The workflow is made up of the following components:
Executable ELF File: To debug your application, you must use an Executable and Linkable Format (ELF) file compiled for debugging. The debug ELF file contains additional debug information for the debugger to make direct associations between the source code and the binaries generated from that original source. In the Vitis Unified IDE, you can opt to Debug or Run, both functionalities contain the same compile options. However, in Run mode, the debugger will not be activated, and no Breakpoints will be hit. Highlight your application under FLOW, select Build and click the hammer icon.
Launch Configuration: To launch the debug session, you must create a Launch Configuration in the Vitis IDE. This configuration captures the options required to start a debug session, including the executable name, processor target to debug, and other information. To create a Launch Configuration, click on the open settings icon for either Debug or Run under FLOW and select New Launch Configuration.
Debug View: Using the Debug View, you can manage the debugging or running of a program in the Vitis IDE. You can control the execution of your program by setting breakpoints, suspending launched programs, stepping through your code, and examining the contents of variables. Select Debug, to launch the Debug View from a Launch Configuration. You can also quickly switch to the Debug View using the Debug icon on the left hand side of the Vitis IDE.
You can repeat the cycle of modifying the code, building the executable, and debugging the program in the Vitis software platform.
Note
If you edit the source after compiling, the line numbering will be out of step because the debug information is tied directly to the source. Similarly, debugging optimized binaries can also cause unexpected jumps in the execution trace.