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 Mon, May 15, 2006 at 05:02:46PM -0400, Daniel Jacobowitz wrote:
> On Mon, May 15, 2006 at 04:34:26PM -0400, Bob Rossi wrote:
> > > > If I use a PTY, which I'm going to have to reimplement. I'll except
> > > > signals like SIGINT, cause I'll forward them with 'write' to the PTY
> > > > between GDB and CGDB. 
> > > 
> > > I don't think "write" will do it; you need something more complicated.
> > > Maybe I'm wrong and writing the interrupt character will do it.
> > 
> > I desire that CGDB works exactly the same as if the user was at the
> > terminal with GDB. So, ^c probably is what I want, since it's what 
> > the user would have to do anyways. Does this sound correct to you?
> 
> The interrupt character is actually configurable; C-c might not
> generate an interrupt, et cetera.  All this stuff is very complex :-)
> 
> (man stty, search for intr)

Thanks, I've spent a lot of time dealing with this in the past. A good
primer for me was Advanced Programming in the UNIX Environment, written
by W Richard Stevens.

Unless an example can be given otherwise, I think writing the char to
the PTY is the best solution. This provides hopefully the exact same
response the user would get while sitting in front of the PTY. However,
you recomendation alerts me that I will need to make sure that the
created PTY has the same values set as the PTY on CGDB's STDIN.

Hopefully, I'll have some solution soon. I think this is a wealth of
information, would all of these details be welcome in the MI manual,
under "Starting and controlling GDB"?

Thanks a lot,
Bob Rossi


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