[英]how to run a program in terminal using c++/python program and then execute statements in that program
I want to create a GUI for GDB debugger, so I need a way to run GDB debugger in terminal and execute commands in that and also get output from that on user triggered events on my screen in ubuntu. 我想为GDB调试器创建一个GUI,因此我需要一种在终端中运行GDB调试器并在其中执行命令的方法,并从ubuntu屏幕上的用户触发事件中获取该输出。 how can I do that for such a program?
如何为这样的程序做呢?
it tried 它尝试了
int main(){
system("gnome-terminal 'gdb test'");
system("break main");
return 0;
}
but it executes the command on the terminal not on the gdb program 但是它在终端而不是gdb程序上执行命令
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.