Is there any way to invoke GDB and control, access it from c++ program?
-
I'm not sure about C++, but the Python bindings might work well for you: sourceware.org/gdb/current/onlinedocs/gdb/Python.htmlTravis Gockel– Travis Gockel2011-08-19 05:03:09 +00:00Commented Aug 19, 2011 at 5:03
-
@Travis Gockel: Thanks for the link. I'll try to get the information from this to get it work in c++.Ambuja– Ambuja2011-08-19 05:05:12 +00:00Commented Aug 19, 2011 at 5:05
Add a comment
|
1 Answer
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.
1 Comment
wilx
@Ambuja: I have edited the answer with links to explain how you could do it.