From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22921 invoked by alias); 18 May 2006 14:36:25 -0000 Received: (qmail 22905 invoked by uid 22791); 18 May 2006 14:36:22 -0000 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 18 May 2006 14:35:57 +0000 Received: by nimbus.ott.qnx.com with Internet Mail Service (5.5.2653.19) id ; Thu, 18 May 2006 10:35:54 -0400 Message-ID: <3518719F06577C4F85DA618E3C37AB91054A9EFD@nimbus.ott.qnx.com> From: Alain Magloire To: gdb@sources.redhat.com Subject: RE: invoking GDB from FE and signals Date: Thu, 18 May 2006 16:27:00 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain 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/msg00276.txt.bz2 > 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. 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.