xgdb
) enables new GDB commands that give you visibility
from the host application into the XRT library. appdebug.py
script as
described in Launching Host and Kernel Debug.There are two kinds of commands which can be called from the gdb
command line:
-
xprint
commands that give visibility into XRT library data structures (cl_command_queue
,cl_event
, andcl_mem
). These commands are explained below. -
xstatus
commands that give visibility into IP running on the Vitis target platform when debugging during hardware execution.
You can get more information about the xprint
and xstatus
commands by using the
help <command>
from the gdb
command prompt.
A typical application for these commands is when you see the host
application hang. In this case, the host application could be waiting for the command
queue to finish, or waiting on an event list. Printing the command queue using the
xprint queue
command can tell you what events are
unfinished, allowing you to analyze dependencies between events.
The output of both of these commands is automatically tracked when
debugging with the Vitis IDE. In this case, three
tabs are provided next to the common tabs for Variables, Breakpoints, and Registers in
the upper left corner of the debug perspective. These are labeled Command Queue, Memory
Buffers, and Platform Debug, showing the output of xprint
queue
, xprint mem
, and xstatus
, respectively.