This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: invoking GDB from FE and signals
On Thu, May 18, 2006 at 10:54:53PM -0400, Daniel Jacobowitz wrote:
> On Thu, May 18, 2006 at 08:58:31PM -0400, Bob Rossi wrote:
> > Unless I'm wrong, and I often am!, I think the 'set tty' option that GDB
> > provides has a major limitation. If the FE uses it, it can't determine
> > which pty to send the SIGINT to when it recieves one. With this in mind,
> > I suggest a new solution that could go in several directions.
> >
> > The inferior and GDB should be run on the same pseudo terminal for the
> > reasons above. So moving the inferior to it's own terminal doesn't help
> > much. I suggest adding a new feature to GDB, something like
> > 'set gdb_io_tty /dev/pts/1' which would tell GDB what tty to output it's
> > I/O. However, GDB wouldn't change it's pty. This way, signals will be
> > delivered as if GDB was on the same terminal. Daniel, correct me if I'm
> > wrong, but this solution would work with the changes we made to the test
> > suite also.
>
> I think you're getting too caught up in the details of your current
> problem, and you've forgotten what you originally wanted to do.
Well, you could be correct. However, I need to both send a signal to the
pty, and know where to send it to. There kind of lumped together.
> You want to be able to interrupt the inferior, if it is running, and
> GDB, if it is not. So why not make GDB handle that? It's GDB's job to
> keep track anyway.
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.
There is 3 choices, and 1 of them is not possible for me, which leaves 2
choices. Does either of these allow GDB to just handle it?
- always send the ^c to GDB's pty
- always send the ^c to inferior's pty
- send the ^c to the active GDB or inferior. With 'set tty' this becomes
a problem that doesn't exist otherwise.
Thanks,
Bob Rossi