Build the ROCm Debugger
-----------------------
-ROCgdb can be built on Ubuntu 16.04, Ubuntu 18.04, and Centos 7.6.
+ROCgdb can be built on Ubuntu 16.04, Ubuntu 18.04, Centos 8.1, RHEL 8.1, and SLES
+15 Service Pack 1.
Building ROCgdb has the following prerequisites:
3. For Ubuntu 16.04 and Ubuntu 18.04 the following adds the needed packages:
````shell
- apt install bison flex gcc make ncurses-dev texinfo g++ \
- zlib1g-dev libexpat-dev libpython2.7-dev python2.7-minimal liblzma-dev \
+ apt install bison flex gcc make ncurses-dev texinfo g++ zlib1g-dev \
+ libexpat-dev libpython2.7-dev python2.7-minimal liblzma-dev \
libbabeltrace-dev libbabeltrace-ctf-dev
````
-4. For CentOS 7.6 the following adds the needed packages:
+4. For CentOS 8.1 and RHEL 8.1 the following adds the needed packages:
````shell
- yum install -y epel-release centos-release-scl
- yum install -y bison flex gcc make texinfo texinfo-tex gcc-c++ \
- zlib-devel expat-devel python-devel xz-devel \
- libbabeltrace-devel ncurses-devel
+ yum install -y epel-release centos-release-scl bison flex gcc make \
+ texinfo texinfo-tex gcc-c++ zlib-devel expat-devel python-devel \
+ xz-devel libbabeltrace-devel ncurses-devel
+ ````
+
+5. For SLES 15 Service Pack 1 the following adds the needed packages:
+
+ ````shell
+ zypper in bison flex gcc make texinfo gcc-c++ zlib-devel libexpat-devel \
+ python-devel xz-devel babeltrace-devel ncurses-devel
````
An example command-line to build ROCgdb on Linux is:
amd_dbgapi_breakpoint_id_t breakpoint_id{ it->first };
amd_dbgapi_breakpoint_action_t action;
- status = amd_dbgapi_report_breakpoint_hit (process_id, breakpoint_id,
- inferior_thread (), &action);
+ status = amd_dbgapi_report_breakpoint_hit (
+ process_id, breakpoint_id,
+ reinterpret_cast<amd_dbgapi_client_thread_id_t> (inferior_thread ()),
+ &action);
if (status != AMD_DBGAPI_STATUS_SUCCESS)
error (_ ("amd_dbgapi_report_breakpoint_hit failed: breakpoint_%ld "
gdb_assert (info->wave_stop_events.empty ());
- status = amd_dbgapi_process_attach (inf, &info->process_id);
+ status = amd_dbgapi_process_attach (
+ reinterpret_cast<amd_dbgapi_client_process_id_t> (inf),
+ &info->process_id);
if (status == AMD_DBGAPI_STATUS_ERROR_VERSION_MISMATCH)
warning (_ ("The version of the kernel driver does not match the version "
/* get_os_pid. */
.get_os_pid = [] (amd_dbgapi_client_process_id_t client_process_id,
pid_t *pid) -> amd_dbgapi_status_t {
- inferior *inf = static_cast<inferior *> (client_process_id);
+ inferior *inf = reinterpret_cast<inferior *> (client_process_id);
struct rocm_inferior_info *info = get_rocm_inferior_info (inf);
if (info->has_exited)
const char *library_name, amd_dbgapi_shared_library_id_t library_id,
amd_dbgapi_shared_library_state_t *library_state)
-> amd_dbgapi_status_t {
- inferior *inf = static_cast<inferior *> (client_process_id);
+ inferior *inf = reinterpret_cast<inferior *> (client_process_id);
struct rocm_inferior_info *info = get_rocm_inferior_info (inf);
if (!library_name || !library_state)
.disable_notify_shared_library
= [] (amd_dbgapi_client_process_id_t client_process_id,
amd_dbgapi_shared_library_id_t library_id) -> amd_dbgapi_status_t {
- inferior *inf = static_cast<inferior *> (client_process_id);
+ inferior *inf = reinterpret_cast<inferior *> (client_process_id);
struct rocm_inferior_info *info = get_rocm_inferior_info (inf);
auto it = info->notify_solib_map.find (library_id.handle);
[] (amd_dbgapi_client_process_id_t client_process_id,
amd_dbgapi_shared_library_id_t library_id, const char *symbol_name,
amd_dbgapi_global_address_t *address) {
- inferior *inf = static_cast<inferior *> (client_process_id);
+ inferior *inf = reinterpret_cast<inferior *> (client_process_id);
struct rocm_inferior_info *info = get_rocm_inferior_info (inf);
auto it = info->notify_solib_map.find (library_id.handle);
amd_dbgapi_shared_library_id_t shared_library_id,
amd_dbgapi_global_address_t address,
amd_dbgapi_breakpoint_id_t breakpoint_id) {
- inferior *inf = static_cast<inferior *> (client_process_id);
+ inferior *inf = reinterpret_cast<inferior *> (client_process_id);
struct rocm_inferior_info *info = get_rocm_inferior_info (inf);
/* Initialize the breakpoint ops lazily since we depend on
.remove_breakpoint =
[] (amd_dbgapi_client_process_id_t client_process_id,
amd_dbgapi_breakpoint_id_t breakpoint_id) {
- inferior *inf = static_cast<inferior *> (client_process_id);
+ inferior *inf = reinterpret_cast<inferior *> (client_process_id);
struct rocm_inferior_info *info = get_rocm_inferior_info (inf);
auto it = info->breakpoint_map.find (breakpoint_id.handle);
[] (amd_dbgapi_client_process_id_t client_process_id,
amd_dbgapi_breakpoint_id_t breakpoint_id,
amd_dbgapi_breakpoint_state_t breakpoint_state) {
- inferior *inf = static_cast<inferior *> (client_process_id);
+ inferior *inf = reinterpret_cast<inferior *> (client_process_id);
struct rocm_inferior_info *info = get_rocm_inferior_info (inf);
auto it = info->breakpoint_map.find (breakpoint_id.handle);