From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12267 invoked by alias); 18 May 2006 16:37:27 -0000 Received: (qmail 12259 invoked by uid 22791); 18 May 2006 16:37:26 -0000 X-Spam-Check-By: sourceware.org Received: from eastrmmtao06.cox.net (HELO eastrmmtao06.cox.net) (68.230.240.33) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 18 May 2006 16:37:24 +0000 Received: from localhost.localdomain ([68.9.66.48]) by eastrmmtao04.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20060518162948.PBSB9931.eastrmmtao04.cox.net@localhost.localdomain>; Thu, 18 May 2006 12:29:48 -0400 Received: from bob by localhost.localdomain with local (Exim 4.52) id 1FglNn-0002Ua-QO; Thu, 18 May 2006 12:29:51 -0400 Date: Thu, 18 May 2006 16:55:00 -0000 From: Bob Rossi To: Alain Magloire Cc: gdb@sources.redhat.com Subject: Re: invoking GDB from FE and signals Message-ID: <20060518162951.GD21003@brasko.net> Mail-Followup-To: Alain Magloire , gdb@sources.redhat.com References: <3518719F06577C4F85DA618E3C37AB91054A9EFD@nimbus.ott.qnx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3518719F06577C4F85DA618E3C37AB91054A9EFD@nimbus.ott.qnx.com> 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/msg00279.txt.bz2 On Thu, May 18, 2006 at 10:35:53AM -0400, Alain Magloire wrote: > > > > Bob Rossi > > Sent: Wednesday, May 17, 2006 9:41 PM > > To: gdb@sources.redhat.com > > Subject: Re: invoking GDB from FE and signals > > > > On Sat, May 13, 2006 at 11:10:57AM -0400, Daniel Jacobowitz wrote: > > > On Sat, May 13, 2006 at 11:10:26AM -0400, Bob Rossi wrote: > > > > OK, I can find out the details. However, I'm thinking the supported > > way > > > > of starting GDB from a FE is via a pipe. This would prevent readline > > > > from being in the way, and is the only way to do it with MI anyways, > > > > right? > > > > > > There's no such thing as "the supported way". > > > > There is something else I just discovered today. I think it's rather > > important. If you start GDB via a pipe, then it will not ask you > > questions like > > Make breakpoint pending on future shared library load? (y or [n]) > > or > > The program is running. Exit anyway? (y or n) > > instead, it will just assume the answer is yes. > > > > So, switching to a pty has other advantages that might not seem obvious > > at first. This could also be documented. > > > > Surprisingly, the main reason why we use a pty in the Eclipse/CDT is to get > rid of the xxxx number of PRs about not seeing the output of printf() and > before you ask ... telling the user to fflush() and explaining the stdio > flushing policy for pipes/files vs. terminal ended up in hate mails. Wow. Alain, thanks for alerting me of this! This is a great point! I've already decided that using a pty was the way to go, but now I'm sure of it. > We send the signal to the inferior ... the problem when running gdb is to > ... get the inferior PID ... sigh. We have circumvent the problem is > commercial products but did not fine a generic way to get the pid. Yes, I'm thinking that there is now way to do what I would like as long as I'm using the 'tty' command. I'm going to have to come up with an alternative to using the 'tty' command. Bob Rossi