-
Notifications
You must be signed in to change notification settings - Fork 4
Running with a debugger
sean-dougherty edited this page Jan 31, 2015
·
2 revisions
This page explains how to use an interactive debugger via the run script.
Please be sure to check out pages specific to your environment:
The run script can be told to launch your program with gdb/lldb via the -g flag:
./run -g 0
This will start a command-line debugger (gdb on Linux/Cygwin, lldb on Mac). If a cuda-edu debugger plugin is available for your system, that plugin will be loaded. Note that if you run with a debugger plugin, cuda-edu will run in single-threaded mode.
To run without the debugger plugin, use the -p flag:
./run -gp 0
You may need to run without the debugger plugin for a couple reasons, including:
- The plugin isn't interacting well with other tools or is crashing.
- You need to debug in multi-threaded mode, perhaps to investigate a race condition in your code.
If you want to run in single-threaded mode, which is the default when using a plugin, use the -s flag:
./run -gps 0