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


 > Nick,
 > 
 > Would you mind posting how Emacs starts up GDB both in annotate mode and
 > in mi mode? Does it use a pty or pipe?
--text follows this line--
I'm not too familiar with the low level stuff.  My understanding (Eli might
correct me) is that Emacs always create a pty if possible and uses a pipe
otherwise (I've not experienced the latter).

It doesn't use readline, probably because the terminal can't have the required
characteristics (Emacs controls all keyboard input) but simulates it through
GDB's complete command that was written especially for Emacs

 > Also, what does it do when ^c is read? Does it 'write' the byte to GDB's
 > stdin? or does it use 'kill(gdb_pid, SIGINT)'?

Emacs uses ^c for other purposes (as a prefix key).  I guess you mean "what
does it do when SIGINT is read" (which is sent by ~c^c).  Well it just works
like it does in a terminal but then I was surprised when Daniel said:

    When the inferior is running and you press Control-C, the signal goes to
    the inferior, not to GDB.

because I had thought it was the other way round and GDB could decide whether
to pass the signal on to the inferior or not according to the output of
"info signal".


-- 
Nick                                           http://www.inet.net.nz/~nickrob


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