From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6757 invoked by alias); 23 Nov 2002 20:34:05 -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 6733 invoked from network); 23 Nov 2002 20:34:04 -0000 Received: from unknown (HELO odin.inter.net.il) (192.114.186.10) by sources.redhat.com with SMTP; 23 Nov 2002 20:34:04 -0000 Received: from zaretsky (adsl-ayalon-pc-129-40.inter.net.il [213.8.129.40]) by odin.inter.net.il (Mirapoint Messaging Server MOS 3.2.1-GA) with ESMTP id AUB32634; Sat, 23 Nov 2002 22:33:55 +0200 (IST) Date: Sat, 23 Nov 2002 12:34:00 -0000 From: "Eli Zaretskii" To: a2782@dis.ulpgc.es Message-Id: <9743-Sat23Nov2002223357+0200-eliz@is.elta.co.il> CC: gdb@sources.redhat.com In-reply-to: <200211231257.gANCv5306686@siglo21.dis.ulpgc.es> (a2782@dis.ulpgc.es) Subject: Re: Emacs and GDB Reply-to: Eli Zaretskii References: <200211231133.gANBXsA06590@siglo21.dis.ulpgc.es> <2950-Sat23Nov2002133546+0200-eliz@is.elta.co.il> <200211231257.gANCv5306686@siglo21.dis.ulpgc.es> X-SW-Source: 2002-11/txt/msg00339.txt.bz2 > 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?