This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: invoking GDB from FE and signals
On Fri, May 19, 2006 at 10:17:02AM -0700, Jim Blandy wrote:
>
> Bob Rossi <bob_rossi@cox.net> writes:
> > On Fri, May 19, 2006 at 08:49:19AM -0400, Daniel Jacobowitz wrote:
> >> On Fri, May 19, 2006 at 06:59:45AM -0400, Bob Rossi wrote:
> >> > OK, you could not be more correct. I want GDB to handle it, not the FE.
> >> > However, how do I let "GDB handle it", while using the 'set tty'
> >> > command? I guess that's the question I've been asking all along.
> >>
> >> Make it trap the SIGINT and do something sensible with it.
> >
> > OK, so, does anyone think this suggestion would have drawbacks?
> > That is, modify GDB so that the FE can always send the signal to the GDB
> > pty, and GDB will figure out what to do with the signal. This would be a
> > wonderful solution. That way, if the FE is using 'set tty' or not, it
> > could always send the signal to the same place.
>
> I totally think you should be using 'set tty'. It's the only way to
> keep inferior and GDB output straight, and nobody has ever had the
> forbearance to explain the drawbacks to me.
>
> I still think it's odd that you would actually want a way to send a
> SIGINT to either the inferior if running or GDB otherwise. But if you
> really do want that, then making GDB deal with it seems like the right
> thing.
Jim, the user can do this exact sort of thing just using plain old GDB.
They don't even know they are doing it probably, they just hit ^c. So,
it's not that I want to send ^c to GDB or inferior, I just want to do
what the user wants.
OK, I have to assume you know more about this than I do. You've been
doing it for much longer. Where does your FE send the ^c when GDB is
running? when inferior is running?
Anyone maintaining an FE using the 'set tty', what does your FE do when
it get's a ^c under these 2 case's?
Thanks,
Bob Rossi