从C ++调用和控制GDB [英] Invoke and control GDB from c++
本文介绍了从C ++调用和控制GDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以调用GDB并进行控制,并从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.
这取决于您要在哪里做.在Windows上,您可以使用以下命令: http: //msdn.microsoft.com/zh-CN/library/ms682499%28v=vs.85%29.aspx
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
在* nix上,将Linux Pipes作为输入和输出中描述的步骤输出 SO答案就可以了.
On *nix, the steps described in Linux Pipes as Input and Output SO answer should do it.
这篇关于从C ++调用和控制GDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文