From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17238 invoked by alias); 24 Nov 2002 05:55:35 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 17231 invoked from network); 24 Nov 2002 05:55:33 -0000 Received: from unknown (HELO is.elta.co.il) (199.203.121.2) by sources.redhat.com with SMTP; 24 Nov 2002 05:55:33 -0000 Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id HAA13489; Sun, 24 Nov 2002 07:55:10 +0200 (IST) Date: Sat, 23 Nov 2002 21:55:00 -0000 From: Eli Zaretskii X-Sender: eliz@is To: Jim Blandy cc: a2782@dis.ulpgc.es, gdb@sources.redhat.com Subject: Re: Emacs and GDB In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-11/txt/msg00342.txt.bz2 On 23 Nov 2002, Jim Blandy wrote: > > 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. Actually, Emacs does both: it uses pseudo-ttys where available, or creates a pipe where they aren't. (More accurately, there's also a third method, via a socket.) The source file process.c in the Emacs distribution has the gory details.