Skip to content

Commit 2c17c8a

Browse files
authored
Update halo-models-debug.md
1 parent 869db63 commit 2c17c8a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

halo-models-debug.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,23 @@ If there is a Segmentation fault, OOM, or core dumped error from the IREE runtim
22
can be helpful in narrowing down the issue.
33

44
# GDB
5+
Build IREE in `RelWithDebInfo` or `Debug` mode.
6+
57
Run your command prepended with `gdb --args`:
68
```
7-
gdb --args iree-benchmark-module ...
9+
gdb --args ../iree-build-trace/tools/iree-run-module ...
810
```
911

10-
When GDB starts, press `r` and Enter to run the program.
12+
When GDB starts, enter the commands below to load symbol table from iree-run-module, set a breakpoint, and run the debugger:
13+
```
14+
Reading symbols from ../iree-build-trace/tools/iree-run-module...
15+
(gdb) file ../iree-build-trace/tools/iree-run-module
16+
Load new symbol table from "../iree-build-trace/tools/iree-run-module"? (y or n) y
17+
Reading symbols from ../iree-build-trace/tools/iree-run-module...
18+
(gdb) break runtime/src/iree/hal/drivers/hip/event_semaphore.c:673
19+
(gdb) r
20+
```
1121

12-
When the program crashes, use `bt` and Enter to get the backtrace of the crash.
1322

1423
# Build IREE with ASAN (Address Sanitizer)
1524
Build IREE with `-DIREE_ASAN_BUILD=ON`.

0 commit comments

Comments
 (0)