Invoke and control GDB from c++
Is there any way 开发者_运维问答to invoke GDB and control, access it from c++ program?
Yes. Execute it with redirected input/output and simply control it through the pipes.
EDIT:
It depends on where you want to do it. On Windows you can use the following: http://msdn.microsoft.com/en-us/library/ms682499%28v=vs.85%29.aspx
On *nix, the steps described in Linux Pipes as Input and Output SO answer should do it.
精彩评论