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. how can I do that for such a program?
system("gnome-terminal 'gdb test'");
Each of the
system() calls opens a separate shell. So these are independent of each other.
If you want to continuously communicate with a child process, rather use