From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3231 invoked by alias); 15 May 2006 20:09:08 -0000 Received: (qmail 3220 invoked by uid 22791); 15 May 2006 20:09:07 -0000 X-Spam-Check-By: sourceware.org Received: from e3.ny.us.ibm.com (HELO e3.ny.us.ibm.com) (32.97.182.143) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 15 May 2006 20:09:05 +0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e3.ny.us.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k4FK91fP020040 for ; Mon, 15 May 2006 16:09:01 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay02.pok.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k4FK91Pe251084 for ; Mon, 15 May 2006 16:09:01 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11/8.13.3) with ESMTP id k4FK90T1031033 for ; Mon, 15 May 2006 16:09:01 -0400 Received: from dufur.beaverton.ibm.com (dufur.beaverton.ibm.com [9.47.22.20]) by d01av04.pok.ibm.com (8.12.11/8.12.11) with ESMTP id k4FK90fc030983; Mon, 15 May 2006 16:09:00 -0400 Subject: Re: invoking GDB from FE and signals From: PAUL GILLIAM Reply-To: pgilliam@us.ibm.com To: Bob Rossi Cc: gdb@sourceware.org In-Reply-To: <20060515194313.GA21608@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> <1147712871.3672.153.camel@dufur.beaverton.ibm.com> <20060515181821.GA18932@brasko.net> <20060515191714.GA5918@nevyn.them.org> <20060515194313.GA21608@brasko.net> Content-Type: text/plain Date: Mon, 15 May 2006 20:11:00 -0000 Message-Id: <1147719922.3672.159.camel@dufur.beaverton.ibm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 (2.2.2-5) Content-Transfer-Encoding: 7bit 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/msg00220.txt.bz2 On Mon, 2006-05-15 at 15:43 -0400, Bob Rossi wrote: > On Mon, May 15, 2006 at 03:17:14PM -0400, Daniel Jacobowitz wrote: > > On Mon, May 15, 2006 at 02:18:21PM -0400, Bob Rossi wrote: > > > OK, here's what happens from the FE perspective though. You type ^c. The > > > FE get's the signal (which is in a different process group than GDB), > > > and passes the signal to GDB with 'kill (gdb_pid, SIGINT)'. > > > > Jim just explained this, but it may not have been clear: that is the > > wrong way to forward the signal. If you are running GDB on a > > pseudo-tty, you need to forward the job control signal to that TTY, not > > to the GDB process itself. > > > > I don't really know how to do that. Is it by setting BRKING in > > termios? There's something about TIOCSIGNAL too. Lots of code for > > this in emacs. > > I'm totally confused. I'm certainly not an expert, but sending a signal > can only be done to a pid using kill. What other ways are there? > > Bob Rossi Two things: 1) Yes the only way to send a signal to a *pid* is with kill. But which pid? DO NOT SEND THE SIGNAL TO GDB! Send it to GDB's inferior. 2) Danial is not asking you to send a signal to a pty, he is asking you to send a signal to GDB's inferior *via* the pty, by using an ioctl function and suggesting that code exists in EMACS to do just that. -=# Paul #=-