rocmarchive / ROCm-GDB

Source code of ROCm-GDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ROCm-GDB - Deprecated Project

This ROCm Debugger is a Deprecated project.

As of 2018, this is a deprecated software project. The ROCm software team is working on a new GDB-based debugger that works with the ROCr Debug Agent to support debugging GPU kernels.

Overview

The ROCm-GDB repository includes the source code for ROCm-GDB. ROCm-GDB is a modified version of GDB 7.11 that supports debugging GPU kernels on Radeon Open Compute platforms (ROCm).

Package Contents

The ROCm-GDB repository includes

  • A modified version of gdb-7.11 to support GPU debugging. Note the main ROCm specific files are located in gdb-7.11/gdb with the rocm-* prefix.
  • The ROCm debug facilities library located in amd/HwDbgFacilities/. This library provides symbol processing for GPU kernels.

Build Steps

  1. Clone the ROCm-GDB repository
  • git clone https://github.com/RadeonOpenCompute/ROCm-GDB.git
  1. The gdb build has been modified with new files and configure settings to enable GPU debugging. The scripts below should be run to compile gdb. The run_configure_rocm.sh script calls the GNU autotools configure with additional parameters. The run_configure_rocm.sh script will create the build directory to build the gdb executable in a out of source manner
  • ./run_configure_rocm.sh debug
  1. The run_configure_rocm.sh script also generates the run_make_rocm.sh which sets environment variables for the Make step
  • ./run_make_rocm.sh

Running ROCm-GDB

The run_make_rocm.sh script builds the gdb executable which will be located in build/gdb/

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

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

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

About

Source code of ROCm-GDB

License:GNU General Public License v3.0


Languages

Language:C 75.3%Language:Assembly 9.7%Language:Objective-C 5.5%Language:Makefile 2.3%Language:Scheme 1.9%Language:C++ 1.8%Language:M4 0.9%Language:Shell 0.7%Language:Yacc 0.4%Language:Ada 0.3%Language:Python 0.3%Language:TeX 0.3%Language:Logos 0.2%Language:Perl 0.2%Language:Roff 0.1%Language:Pascal 0.1%Language:GDB 0.0%Language:C# 0.0%Language:DIGITAL Command Language 0.0%Language:HTML 0.0%Language:Fortran 0.0%Language:Lex 0.0%Language:CMake 0.0%Language:sed 0.0%Language:Awk 0.0%Language:CLIPS 0.0%Language:Emacs Lisp 0.0%Language:XSLT 0.0%Language:Java 0.0%Language:Go 0.0%Language:Batchfile 0.0%Language:SAS 0.0%Language:Module Management System 0.0%Language:DTrace 0.0%Language:R 0.0%Language:Mathematica 0.0%