Skip to content

Commit dc444b0

Browse files
committed
ADD: instructions for using gdb
1 parent 94f72b1 commit dc444b0

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

CONTRIBUTING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,27 @@ private:
115115
#include "aiacpch.h"
116116
```
117117

118+
### Debugging with GDB
119+
We use GDB for debugging. To install GDB on windows, do the following:
120+
1. Download the MSYS2 installer from the [MSYS2 website](https://www.msys2.org/).
121+
2. Run the installer and follow the instructions in the [MSYS2 installation guide](https://www.msys2.org/wiki/MSYS2-installation/).
122+
3. Open the MSYS2 terminal and update the core package database:
123+
```bash
124+
pacman -Syu
125+
```
126+
4. Install the GDB debugger:
127+
```bash
128+
pacman -S mingw-w64-x86_64-gdb
129+
```
130+
5. Add the GDB to the system path in PATH_ENVIRONMENT:
131+
6. Close the terminal sessions you where using and open a new one. Now you can use GDB.
132+
```bash
133+
gdb "path-to-executable"
134+
```
135+
> use `run` to start the program and `quit` to exit the debugger.
136+
> use `break` to set a breakpoint and `continue` to continue the execution of the program.
137+
> use `bt` to see the backtrace of the program when a segfault occurs.
138+
118139
### Doxygen
119140
For documentation we use the [*JavaDoc" convention](https://doxygen.nl/manual/docblocks.html).
120141
Follow [this guide for documenting the code](https://developer.lsst.io/cpp/api-docs.html).

0 commit comments

Comments
 (0)