From 89be44177cbc3be24fe75a4113f2741aacf77455 Mon Sep 17 00:00:00 2001 From: Bence Parajdi Date: Wed, 15 May 2024 14:04:47 +0200 Subject: [PATCH] change format for commands and remove accidental cuda reference --- docs/how-to/rocgdb.rst | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/docs/how-to/rocgdb.rst b/docs/how-to/rocgdb.rst index dd348bb0ee..0532467c49 100644 --- a/docs/how-to/rocgdb.rst +++ b/docs/how-to/rocgdb.rst @@ -13,7 +13,7 @@ Introduction `ROCgdb `_ is the AMD ROCm debugger for Linux targets. ROCgdb is an extension to GDB, the GNU Project debugger. The tool provides developers -with a mechanism for debugging CUDA applications running on actual hardware. This tool +with a mechanism for debugging ROCm applications running on actual hardware. This tool enables developers to debug applications without the potential variations introduced by simulation and emulation environments. It presents a seamless debugging environment that allows simultaneous GPU and CPU code debugging within the same @@ -48,7 +48,9 @@ documentation `_. First step is to run ROCgdb with your ROCm application: -``rocgdb my_application`` +.. code-block:: shell + + rocgdb my_application At this point the application is not running, but you'll have access to the debugger console. Here you can use every gdb option for host debugging and you can use them and @@ -56,12 +58,16 @@ extra ROCgdb specific features for device debugging. You'll need to set a breakpoint before you run your application with the debugger. -``tbreak my_app.cpp:458`` +.. code-block:: shell + + tbreak my_app.cpp:458 This will place a breakpoint at the specified line. To start your application use this command: -``run`` +.. code-block:: shell + + run If the breakpoint is in the device code, the debugger will also show the device and host threads. The device threads will not be individual threads; instead, they represent a @@ -71,29 +77,38 @@ between host threads. You can also switch between layouts. Use different layouts for different situations while debugging. -``layout src`` +.. code-block:: shell -``layout asm`` + layout src + layout asm The `src` layout is the source code view, while the `asm` is the assembly view. There are further layouts you can look up in the `GDB documentation `_. -``info threads`` +.. code-block:: shell + + info threads This command lists all threads with id and information on where the thread is stopped. To switch threads you can use the following command: -``thread `` +.. code-block:: shell + + thread To take a step in the execution use: -``n`` +.. code-block:: shell + + n To dump the content of the current wavefronts registers use: -``i r`` +.. code-block:: shell + + i r The result of this command is just the register dump, which is the all-inclusive data about the state of the current wavefront, but very difficult to parse.