Skip to content

Commit 7553c9a

Browse files
committed
fix review comments
1 parent 50a17cd commit 7553c9a

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

docs/how-to/rocgdb.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@
44
:keywords: AMD, ROCm, HIP, ROCgdb, performance, debugging
55

66
*******************************************************************************
7-
ROCgdb
7+
ROCgdb debugger for Linux targets
88
*******************************************************************************
99

1010
.. _rocgdb_introduction:
1111
Introduction
1212
===============================================================================
13-
This document introduces ROCgdb, the AMD ROCm debugger for Linux targets.
13+
`ROCgdb <https://github.com/ROCm/ROCgdb>`_ is the AMD ROCm debugger for Linux targets.
1414

1515
ROCgdb is an extension to GDB, the GNU Project debugger. The tool provides developers
16-
with a mechanism for debugging CUDA applications running on actual hardware. This
16+
with a mechanism for debugging CUDA applications running on actual hardware. This tool
1717
enables developers to debug applications without the potential variations introduced
18-
by simulation and emulation environments. It is meant to present a seamless debugging
19-
environment that allows simultaneous debugging of both GPU and CPU code within the
20-
same application, just like programming in HIP is a seamless extension of C++
18+
by simulation and emulation environments. It presents a seamless debugging
19+
environment that allows simultaneous GPU and CPU code debugging within the same
20+
application, just like programming in HIP, which is a seamless extension of C++
2121
programming. The existing GDB debugging features are inherently present for debugging
2222
the host code, and additional features have been provided to support debugging ROCm
2323
device code.
2424

25-
ROCgdb supports HIP kernel debugging. It allows the user to set breakpoints, to
26-
single-step ROCm applications, and also to inspect and modify the memory and variables
27-
of any given thread running on the hardware.
25+
ROCgdb supports HIP kernel debugging. It allows you to set breakpoints, single-step
26+
ROCm applications, and inspect and modify the memory and variablesof any given thread
27+
running on the hardware.
2828

2929
.. _rocgdb_installation:
3030
Installation
@@ -35,17 +35,16 @@ before using the debugger.
3535
.. _rocgdb_setup:
3636
Setup
3737
===============================================================================
38-
Before debugging you have to compile your software with debug information. To do this
39-
you have to add the '-g' flag for your compilation command. This will generate debug
40-
information even when optimizations are turned on. Notice that higher optimization
41-
levels make the debugging more difficult, so it might be useful to turn off these
42-
optimizations by using the '-O0' compiler option.
38+
Before debugging, compile your software with debug information. Add the ‘-g’ flag to your
39+
compilation command to do this. This generates debug information even when optimizations
40+
are turned on. Notice that higher optimization levels make the debugging more difficult,
41+
so it might be helpful to turn off these optimizations using the ‘-O0’ compiler option.
4342

4443
.. _rocgdb_debugging:
4544
Debugging
4645
===============================================================================
47-
This section is a brief introduction on how to use ROCgdb. For a more information on the
48-
functionality of gdb look up the gdb documentation.
46+
This section introduces how to use ROCgdb. For more information about GDB, see the `GDB
47+
documentation <https://www.sourceware.org/gdb/documentation/>`_.
4948

5049
First step is to run ROCgdb with your ROCm application:
5150

@@ -55,7 +54,7 @@ At this point the application is not running, but you'll have access to the debu
5554
console. Here you can use every gdb option for host debugging and you can use them and
5655
extra ROCgdb specific features for device debugging.
5756

58-
Before you run your application with the debugger, you'll need to set a breakpoint.
57+
You'll need to set a breakpoint before you run your application with the debugger.
5958

6059
``tbreak my_app.cpp:458``
6160

@@ -64,9 +63,9 @@ command:
6463

6564
``run``
6665

67-
If the breakpoint is in device code the debugger will show the device and host threads as
68-
well. The device threads will not be individual threads, instead they represent a
69-
wavefront on the device. You can switch between the device wavefronts, like you would
66+
If the breakpoint is in the device code, the debugger will also show the device and host
67+
threads. The device threads will not be individual threads; instead, they represent a
68+
wavefront on the device. You can switch between the device wavefronts as you would
7069
between host threads.
7170

7271
You can also switch between layouts. Use different layouts for different situations while
@@ -77,7 +76,8 @@ debugging.
7776
``layout asm``
7877

7978
The `src` layout is the source code view, while the `asm` is the assembly view. There are
80-
further layouts you can look up on the gdb documentation.
79+
further layouts you can look up in the `GDB documentation
80+
<https://www.sourceware.org/gdb/documentation/>`_.
8181

8282
``info threads``
8383

@@ -95,5 +95,5 @@ To dump the content of the current wavefronts registers use:
9595

9696
``i r``
9797

98-
For further information on the usage of gdb, you can go to the `gdb documentation
99-
<https://www.sourceware.org/gdb/documentation/>`_.
98+
The result of this command is just the register dump, which is the all-inclusive data
99+
about the state of the current wavefront, but very difficult to parse.

0 commit comments

Comments
 (0)