Skip to content

trinayan/HSA-Debugger-GDB-Source-AMD

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HSA-Debugger-GDB-Source-AMD

The HSA-Debugger-GDB-Source-AMD repository includes the source code for AMD hsail-gdb. Hsail-gdb is a modified version of GDB 7.8 that supports debugging HSAIL kernels on AMD platforms.

Package Contents

The HSA-Debugger-GDB-Source-AMD repository includes

  • A modified version of gdb-7.8 to support HSAIL debugging. Note the main hsail specific files are located in gdb-7.8/gdb with the hsail-* prefix.
  • The AMD debug facilities library located in amd/HwDbgFacilities/. This library provides symbol processing for HSA kernels.

Build Steps

  1. Clone the HSA-Debugger-GDB-Source-AMD repository
  • git clone https://github.com/HSAFoundation/HSA-Debugger-GDB-Source-AMD.git
  1. The gdb build has been modified with new files and configure settings to enable HSAIL debugging. The scripts below should be run to compile gdb. The run_configure_hsail script calls the GNU autotools configure with additional parameters.
  • ./run_configure_hsail.sh debug
  1. The run_configure_hsail.sh script also generates the run_make_hsail.sh which sets environment variables for the Make step
  • ./run_make_hsail.sh

Running hsail-gdb

The run_make_hsail.sh script builds the gdb executable.

To run the hsail debugger, you'd also need to get the AMD GPU Debug SDK.

Before running the hsail debugger, the LD_LIBRARY_PATH should include paths to

  • The AMD GPU Debug Agent library built in the AMD GPU Kernel Debug SDK (located in HSA-Debugger-Source-AMD/lib/x86_64)
  • The AMD GPU Kernel Debugging library binary shippped with the AMD GPU Kernel Debug SDK (located in HSA-Debugger-Source-AMD/lib/x86_64)
  • Before running hsail-gdb, please update your .gdbinit file with text in HSA-Debugger-Source-AMD\src\HSADebugAgent\gdbinit. The hsailConfigure function in the ~/.gdbinit sets up gdb internals for supporting HSAIL kernel debug.
  • The gdb executable should be run from within the hsail-gdb-local script. The AMD HSA runtime requires certain environment variables to enable kernel debugging and this is set up by the hsail-gdb-local script.
./hsail-gdb-local <HSA sample application>

About

Contains the AMD HSAIL-GDB source codes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 81.6%
  • Assembly 10.2%
  • Makefile 2.3%
  • Scheme 2.0%
  • C++ 1.5%
  • Shell 0.6%
  • Other 1.8%