The Vitis IDE debug environment has many features found in traditional GUI-based debug environments, such as GDB. You can add break points to the code, step over or step into specific lines of codes, loops, or functions, and examine the state of variables and force them to specific values. These are just a few of the features in the Vitis IDE debug environment.
After you have launched Debug, you will see several windows or views displayed, such as the Debug Configurations view in the upper left of the display, as shown in the following figure. During the debug process, several windows show the debug state that include code at break point, step over states, break-points view, variables view, registers view, disassemble view, and pipeline view (single kernel only).
The Debug view shows states of cores that are under debug. It shows where (which file and which line of source code of the file) debugger stops at and with what action it is taking (breakpoint/step over/…) as shown in the following figure.
The following figure shows the Breakpoints information with current setup breakpoints. The square with a check mark indicates the breakpoint is enabled. Click on the check mark to clear the check mark and disable breakpoint during debugging. This lets you manage breakpoints without having to remove them or add them back into the code.
main()
by default. However, breakpoints attached to a while
statement consume two breakpoint resources, A workaround is to attach the
breakpoint inside the
while
loop; this only consumes one break
point. Variable values show the kernel variables values. Depending on variable type, clicking on a variable shows its type, value, and the address of the variable. For array/structure variables, click on the arrow of the variable expands array/structure content of the array.
Click on Variable to obtain address information and then click on the + from the Memory window and enter the memory address of the variable. The value of that variable shows up along with other memory content. Variable values can be change by click on variable’s value field, enter new value and enter again to set the value of the variable.
You can specify the format of the data presented in the Memory window by clicking on the New Renderings tab, specifying the format of the data to present, and click Add Rendering(s).
In the Registers view, the values are updated during the debug process and are highlighted in the Vitis IDE.