From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11995 invoked by alias); 15 May 2006 19:51:47 -0000 Received: (qmail 11951 invoked by uid 22791); 15 May 2006 19:51:45 -0000 X-Spam-Check-By: sourceware.org Received: from eastrmmtao04.cox.net (HELO eastrmmtao04.cox.net) (68.230.240.35) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 15 May 2006 19:51:41 +0000 Received: from localhost.localdomain ([68.9.66.48]) by eastrmmtao02.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20060515182140.IJG15470.eastrmmtao02.cox.net@localhost.localdomain>; Mon, 15 May 2006 14:21:40 -0400 Received: from bob by localhost.localdomain with local (Exim 4.52) id 1Ffhi6-00056o-K8; Mon, 15 May 2006 14:22:26 -0400 Date: Mon, 15 May 2006 20:09:00 -0000 From: Bob Rossi To: Jim Blandy Cc: gdb@sourceware.org, Nick Roberts Subject: Re: invoking GDB from FE and signals Message-ID: <20060515182226.GB18932@brasko.net> References: <20060513141920.GC10678@brasko.net> <20060513145421.GA3664@nevyn.them.org> <20060513151026.GD10678@brasko.net> <20060513151057.GA4112@nevyn.them.org> <20060513152021.GE10678@brasko.net> <20060513154816.GA5022@nevyn.them.org> <20060513171441.GA13445@brasko.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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/msg00218.txt.bz2 On Sun, May 14, 2006 at 11:55:10PM -0700, Jim Blandy wrote: > > Bob Rossi writes: > > Would you mind posting how Emacs starts up GDB both in annotate mode and > > in mi mode? Does it use a pty or pipe? > > > > Also, what does it do when ^c is read? Does it 'write' the byte to GDB's > > stdin? or does it use 'kill(gdb_pid, SIGINT)'? > > The Emacs Lisp 'start-process' function, which is what the GDB mode > and other shell modes use, creates a pseudo-tty by default (when > available). You can dynamically bind process-connection-type while > calling it to get pipes if you want. > > When the process is communicating with Emacs via a pipe, Emacs sends > signals to it with 'kill'. When the process is using a pseudo-tty, > Emacs uses an ioctl on the master side to get the effect of the user > hitting C-c, but in a way that works even if the program has changed > the tty settings. I think at one point Emacs actually fetched the > 'intr' character from the tty's settings, and stuffed that character > into the master side, letting the tty driver generate the signal. But > you want to get the tty device involved somehow, so that the signal > will go to the tty's current process group. > > > (That was all so long ago...) Jim, Thanks! You helped solve the problem. The user initially reported that sending ^c to the FE while the inferior was running would cause GDB to shut down. I asked the user to try emacs, and he reported that this worked fine. After finding out about process-connection-type, I asked him to set that to nil. The user told me that emacs also causes GDB to shut down when sending ^c to emacs while the inferior is running. So, now that I know what the problem is, I'll fix it on my end. However, could this be a potential GDB bug? or is this intended functionality? If it's thought to be a bug, I could get the latest GDB built on that system to see the behavior. Thanks, Bob Rossi