I want to turn certain debug statements on when i’m debugging with gdb and id rather not do it by hand. I found code using ptrace which will detect gdb on *nix, but that doesnt exist on windows. I am compiling with mingw gcc on windows.
I want to turn certain debug statements on when i’m debugging with gdb and
Share
Windows has a function named
IsDebuggerPresent. I’m not sure it’ll work with gdb, but assuming it uses the normal Windows functions, it should be fine.