-
Notifications
You must be signed in to change notification settings - Fork 284
Developing GammaRay
This page is for modifying/debugging GammaRay itself, it's irrelevant if you only want to use GammaRay to debug your own application.
The probe is loaded into the target application, so attaching a debugger at runtime works as usual. Attaching the debugger at startup is tricky though, as you need to get in between the injector and the target.
There's an environment variable GAMMARAY_GDB, when set to 1 it attaches gdb and stops the target from within the injector.
There's also variables for doing the same with Valgrind, see processinjector.cpp (2.2 or older), or starting from 2.3 an environment variable for a generic wrapper command for the target (GAMMARAY_TARGET_WRAPPER).
TODO
Attaching to the client at runtime is straightforward (gammaray-client.exe, not gammaray.exe!), in order to debug its startup, launch it manually (on Unix it's in $PREFIX/lib/gammaray/libexec), and pass host name and port as command line arguments.