This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: invoking GDB from FE and signals


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]