From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3231 invoked by alias); 15 May 2006 21:08:22 -0000 Received: (qmail 3211 invoked by uid 22791); 15 May 2006 21:08:22 -0000 X-Spam-Check-By: sourceware.org Received: from eastrmmtai07.cox.net (HELO eastrmmtai07.cox.net) (68.230.240.52) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 15 May 2006 21:08:19 +0000 Received: from localhost.localdomain ([68.9.66.48]) by eastrmmtao03.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20060515210816.DEQ15797.eastrmmtao03.cox.net@localhost.localdomain>; Mon, 15 May 2006 17:08:16 -0400 Received: from bob by localhost.localdomain with local (Exim 4.52) id 1FfkJK-0006Md-LW; Mon, 15 May 2006 17:09:02 -0400 Date: Mon, 15 May 2006 21:33:00 -0000 From: Bob Rossi To: PAUL GILLIAM , gdb@sourceware.org Subject: Re: invoking GDB from FE and signals Message-ID: <20060515210902.GE21608@brasko.net> References: <20060513154816.GA5022@nevyn.them.org> <1147712871.3672.153.camel@dufur.beaverton.ibm.com> <20060515181821.GA18932@brasko.net> <20060515191714.GA5918@nevyn.them.org> <20060515194313.GA21608@brasko.net> <20060515200547.GA8151@nevyn.them.org> <20060515201006.GB21608@brasko.net> <20060515202042.GA8673@nevyn.them.org> <20060515203426.GD21608@brasko.net> <20060515210246.GA9737@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060515210246.GA9737@nevyn.them.org> User-Agent: Mutt/1.5.9i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00226.txt.bz2 On Mon, May 15, 2006 at 05:02:46PM -0400, Daniel Jacobowitz wrote: > On Mon, May 15, 2006 at 04:34:26PM -0400, Bob Rossi wrote: > > > > If I use a PTY, which I'm going to have to reimplement. I'll except > > > > signals like SIGINT, cause I'll forward them with 'write' to the PTY > > > > between GDB and CGDB. > > > > > > I don't think "write" will do it; you need something more complicated. > > > Maybe I'm wrong and writing the interrupt character will do it. > > > > I desire that CGDB works exactly the same as if the user was at the > > terminal with GDB. So, ^c probably is what I want, since it's what > > the user would have to do anyways. Does this sound correct to you? > > The interrupt character is actually configurable; C-c might not > generate an interrupt, et cetera. All this stuff is very complex :-) > > (man stty, search for intr) Thanks, I've spent a lot of time dealing with this in the past. A good primer for me was Advanced Programming in the UNIX Environment, written by W Richard Stevens. Unless an example can be given otherwise, I think writing the char to the PTY is the best solution. This provides hopefully the exact same response the user would get while sitting in front of the PTY. However, you recomendation alerts me that I will need to make sure that the created PTY has the same values set as the PTY on CGDB's STDIN. Hopefully, I'll have some solution soon. I think this is a wealth of information, would all of these details be welcome in the MI manual, under "Starting and controlling GDB"? Thanks a lot, Bob Rossi