4 This is ROCgdb, the ROCm source-level debugger for Linux, based on GDB, the GNU
5 source-level debugger. It includes support for heterogenous debugging on the
6 ROCm platform of an x86-based host architecture together with the AMD
7 commercially available GPU architectures supported by the AMD Debugger API which
8 is included with the ROCm release as the ROCdbgapi library.
10 Standard GDB commands can be used for both CPU and GPU code debugging. For more
11 information about ROCgdb, please refer to the *ROCgdb User Manual* which is
12 installed as both texinfo files and as a single PDF file in
13 ``/opt/rocm/share/doc/gdb`. In particular, refer to the *Debugging Heterogeneous
14 Programs* chapter for general information, and the *AMD GPU* subsection of the
15 *Architectures* section in the *Configuration-Specific Information* chapter. The
16 *AMD GPU* subsection also provides the list of features not currently
17 implemented, and known current restrictions.
19 For more information about ROCm, please refer to:
21 - https://github.com/RadeonOpenCompute/ROCm
23 For more information about GDB, please refer to the README file in this folder
24 or check the GDB home page at:
26 - http://www.gnu.org/software/gdb
28 Build the ROCm Debugger
29 -----------------------
31 ROCgdb can be built on Ubuntu 16.04, Ubuntu 18.04, and Centos 7.6.
33 Building ROCgdb has the following prerequisites:
35 1. A C++11 compiler such as GCC 4.8 or Clang 3.3.
37 2. AMD Debugger API Library (ROCdbgapi) which can be installed as part of the
38 ROCm release by the ``rocm-dbgapi`` package.
40 3. For Ubuntu 16.04 and Ubuntu 18.04 the following adds the needed packages:
43 apt install bison flex gcc make ncurses-dev texinfo g++ \
44 zlib1g-dev libexpat-dev libpython2.7-dev python2.7-minimal liblzma-dev \
45 libbabeltrace-dev libbabeltrace-ctf-dev
48 4. For Centos 7.6 the following adds the needed packages:
51 yum install -y epel-release centos-release-scl
52 yum install -y bison flex gcc make texinfo gcc-c++ \
53 zlib-devel expat-devel python-devel xz-devel \
54 libbabeltrace-devel ncurses-devel
57 An example command-line to build ROCgdb on Linux is:
63 ../configure --program-prefix=roc \
64 --enable-64-bit-bfd --enable-targets="x86_64-linux-gnu,amdgcn-amd-amdhsa" \
65 --disable-ld --disable-gas --disable-gdbserver --disable-sim --enable-tui \
66 --disable-gdbtk --disable-shared --with-expat --with-system-zlib \
67 --without-guile --with-babeltrace --with-lzma --with-python
71 Specify ``--with-rocm-dbgapi=PATH`` if the the AMD Debugger API Library
72 (ROCdbgapi) is not installed in its default location. The ``configure`` script
73 looks in ``PATH/include`` and ``PATH/lib``. The default value for ``PATH`` is
76 The built ROCgdb executable will be placed in:
80 The texinfo *User Manual* will be placed in:
82 - ``build/gdb/doc/gdb.info``
90 The installed ROCgdb will be placed in:
92 - ``<prefix>/bin/rocgdb``
94 To execute ROCgdb, the ROCdbgapi library and its dependent ROCcomgr library must
95 be installed. These can be installed as part of the ROCm release by the
96 ``rocm-dbgapi`` package:
98 - ``librocm-dbgapi.so.0``
99 - ``libamd_comgr.so.1``
101 The PDF *User Manual* can be generated with:
107 The generated PDF will be placed in:
109 - ``build/gdb/doc/gdb.pdf``