You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Volker Krause edited this page Jan 17, 2015
·
3 revisions
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.
Debugging the probe
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.
Unix
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).
Windows
TODO
Debugging the client
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.