Set breakpoint in C or C++ code programmatically for gdb on Linux -
how can set breakpoint in c or c++ code programatically work gdb on linux?
i.e.:
int main(int argc, char** argv) { /* set breakpoint here! */ int = 3; a++; /* in gdb> print a; expect result 3 */ return 0; }
one way signal interrupt:
#include <csignal> // generate interrupt std::raise(sigint);
in c:
#include <signal.h> raise(sigint);
update: msdn states windows doesn't support sigint
, if portability concern, you're better off using sigabrt
.
Comments
Post a Comment