From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15758 invoked by alias); 25 Nov 2002 14:50:29 -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 15739 invoked from network); 25 Nov 2002 14:50:28 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 25 Nov 2002 14:50:28 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id JAA25375; Mon, 25 Nov 2002 09:46:07 -0500 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id JAA27419; Mon, 25 Nov 2002 09:41:11 -0500 Message-ID: <01f501c29491$f25e72c0$0202040a@catdog> From: "Kris Warkentin" To: , References: <200211231133.gANBXsA06590@siglo21.dis.ulpgc.es> <2950-Sat23Nov2002133546+0200-eliz@is.elta.co.il> <200211231257.gANCv5306686@siglo21.dis.ulpgc.es> Subject: Re: Emacs and GDB Date: Mon, 25 Nov 2002 06:50:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-SW-Source: 2002-11/txt/msg00353.txt.bz2 Another place you might like to look is the sources for DDD. The file 'Agent.C' does the setup of the pty with the pipes and dups and all the other fun stuff. You can also look at some of it's subclasses such as AsyncAgent which modify the behaviour somewhat. A cool thing with DDD (maybe emacs too?) is that you can access the gdb console and use 'show args' to see how they setup the command line with the redirection and so on. cheers, Kris ----- Original Message ----- From: To: Sent: Saturday, November 23, 2002 7:57 AM Subject: Re: Emacs and GDB > 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). > > Thanks to all people who are replying me! > > > Emacs calls GDB like this: > > > > gdb -fullname > > > > where \"\" is whatever you type at \"M-x gdb\"\'s prompt. > > > > In other words, if you tell Emacs to invoke GDB with \"gdb myprog\", > > Emacs invokes \"gdb -fullname myprog\". > > > > See gud.el in the Emacs distribution for more details, and see the GDB > > user manual for the description of the -fullname option. > > >