Xilinx GDB Extensions

Application Debug introduces new GDB commands, provided by Xilinx, that give visibility into the host application and into the platform IPs.
Note: These commands need to be enabled as described in Launching GDB Standalone.

There are two groups of commands:

  • The commands that give visibility into the OpenCL runtime data structures (cl_command_queue, cl_event, and cl_mem). Note that the arguments to "xprint queue" and "xprint mem" are optional. The application debug internally tracks the OpenCL objects and automatically prints all valid queues and cl_mem if the argument is not specified. In addition, the commands do a proper validation of supplied command queue, event, and cl_mem arguments.

    xprint queue [<cl_command_queue>]
    xprint event <cl_event>
    xprint mem [<cl_mem>]
    xprint kernel
    xprint all
    
  • The commands that give visibility into the IPs on the platform. Note, this functionality is only available in the “System” flow and not in any of the emulation flows.
    xstatus all
    xstatus --<ipname> 
    xstatus --<ipname>
    

The GDB commands allow the interaction between the host code and the kernel, which is managed through the OpenCL APIs, to be analyzed during debug. Help information about the commands can be obtained using help <command> (like help xprint).

A typical example for the use of these commands is if you are seeing a hang. In this case, the host application is likely waiting for the command queue to finish or waiting on an event list. Printing the command queue using xprint commands can tell you what events are unfinished and you can analyze the dependencies between the events.