Interacting between two different programs

yaz yazan.dabain at gmail.com
Sat Jun 29 00:45:01 PDT 2013


On Saturday, 29 June 2013 at 06:08:28 UTC, Jeremy DeHaan wrote:
> I've been toying around with the idea of working on an IDE, 
> mostly because I think it would be an interesting/fun project 
> to work on. In any case, the only thing I cannot seem to wrap 
> my head around is how programs like Code Blocks and Visual 
> Studio, and various other IDE's interact with debuggers as if 
> it isn't some external thing.
>
> How does someone have one program interact with another like 
> this? Can you have one send its output to the other's input? Do 
> they somehow share the same IO's? I've never had to write code 
> that does anything like this so I'm you great minds out there 
> can shed some light.
>
> Thanks in advance!

You can use std.phobos.pipeProcess to interact with an external 
process that you spawn. This works by connecting the standard 
streams between the child and parent processes, so that they can 
send and receive data.
GDB provides an interface that can be used with this kind of 
intercommunication. It is called GDB MI. You can read about it 
here 
http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_node/gdb_211.html#SEC216


More information about the Digitalmars-d-learn mailing list