Emacs and GDB

Jim Blandy jimb@redhat.com
Sat Nov 23 15:52:00 GMT 2002


"Eli Zaretskii" <eliz@is.elta.co.il> writes:

> > Date: Sat, 23 Nov 2002 12:57:05 GMT
> > From: a2782@dis.ulpgc.es
> > 
> > Any idea about how can I do this emacs-style invocation in (Kylix) C++? 
> > I want to execute GDB and redirect its input to the output of my 
> > program in C++ (in order to send commands to GDB); and its output to 
> > the input of my C++ program (in order to parse the information which 
> > GDB returns).
> 
> Why not do what Emacs does: create a pipe for communications between
> GDB and your program, then fork/exec GDB and redirect its standard
> streams to the pipe using dup2/dup system calls?

Actually, Emacs creates a pseudo-tty, and runs GDB there.  That allows
Emacs to send a SIGINT when the user types 'C-c C-c', and things like
that.



More information about the Gdb mailing list