3

Is there any way to invoke GDB and control, access it from c++ program?

2
  • I'm not sure about C++, but the Python bindings might work well for you: sourceware.org/gdb/current/onlinedocs/gdb/Python.html Commented 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++. Commented Aug 19, 2011 at 5:05

1 Answer 1

6

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.

Sign up to request clarification or add additional context in comments.

1 Comment

@Ambuja: I have edited the answer with links to explain how you could do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.