Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@codesourcery.com>
To: Bob Rossi <bob_rossi@cox.net>
Cc: gdb@sourceware.org,  Nick Roberts <nickrob@snap.net.nz>
Subject: Re: invoking GDB from FE and signals
Date: Mon, 15 May 2006 18:50:00 -0000	[thread overview]
Message-ID: <vt23bfb871s.fsf@theseus.home.> (raw)
In-Reply-To: <20060515134010.GG13445@brasko.net> (Bob Rossi's message of "Mon, 15 May 2006 09:40:10 -0400")


Bob Rossi <bob_rossi@cox.net> writes:
> On Sun, May 14, 2006 at 11:55:10PM -0700, Jim Blandy wrote:
>> 
>> Bob Rossi <bob_rossi@cox.net> writes:
>> > Would you mind posting how Emacs starts up GDB both in annotate mode and
>> > in mi mode? Does it use a pty or pipe?
>> >
>> > 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)'?
>> 
>> The Emacs Lisp 'start-process' function, which is what the GDB mode
>> and other shell modes use, creates a pseudo-tty by default (when
>> available).  You can dynamically bind process-connection-type while
>> calling it to get pipes if you want.
>
> Hey Jim, thanks for the info! The user that's having the problem with my
> FE states that emacs works fine. So, are you suggesting I could have him
> put some configuration line with regards to 'process-connection-type' to
> get emacs to use a pipe instead of a pty? If so, it would be perfect to
> see emacs also produce the same bug that my FE is producing. Do you know
> the exact line that he could add to a particular file in order to get
> emacs working like this?

I think if you switch from a pty to a pipe, there will be lots of
different changes in the behavior of the subprocess.  You might get
behavior like what your front end shows, but you might not even get
that far.  Or there might be other confusing things going on.

You could put

(setq process-connection-type nil)

in your .emacs file.  But only use this for testing!  Take it out when
you're done.  process-connection-type is meant to be used in
combination with Emacs Lisp's dynamic binding; if you just whack its
value globally you'll get all sorts of wierd behavior from anything
that tries to run a subprocess from a pty.

> Wow, this information is amazingly helpful. I do the same solution emacs
> is doing with regards to pipe's. I used to actually do the pty solution.
> I'm considering adding an option also, to allow using both solutions.

If you're not familiar with how job control works, and how it
interacts with tty devices, you should definitely read up on that.  If
you're not interacting with the tty in a way that plays nicely with
GDB's tty management code, then you'll have all sorts of problems like
this.


  reply	other threads:[~2006-05-15 18:41 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-13 15:09 Bob Rossi
2006-05-13 15:11 ` Daniel Jacobowitz
2006-05-13 15:19   ` Bob Rossi
2006-05-13 15:48     ` Daniel Jacobowitz
2006-05-13 15:49       ` Bob Rossi
2006-05-13 17:11         ` Daniel Jacobowitz
2006-05-14  3:25           ` Bob Rossi
2006-05-14  4:17             ` Nick Roberts
2006-05-14  4:18               ` Eli Zaretskii
2006-05-14  5:01               ` Daniel Jacobowitz
2006-05-15  6:55                 ` Nick Roberts
2006-05-15 13:35                   ` Daniel Jacobowitz
2006-05-15 13:39                 ` Bob Rossi
2006-05-15 15:04                   ` Daniel Jacobowitz
2006-05-15 19:04                   ` Jim Blandy
2006-05-15 13:37             ` Jim Blandy
2006-05-15 14:58               ` Bob Rossi
2006-05-15 18:50                 ` Jim Blandy [this message]
2006-05-15 20:09               ` Bob Rossi
2006-05-15 18:42           ` PAUL GILLIAM
2006-05-15 19:18             ` Bob Rossi
2006-05-15 19:43               ` Daniel Jacobowitz
2006-05-15 20:05                 ` Bob Rossi
2006-05-15 20:09                   ` Daniel Jacobowitz
2006-05-15 20:20                     ` Bob Rossi
2006-05-15 21:02                       ` Daniel Jacobowitz
2006-05-15 21:08                         ` Bob Rossi
2006-05-15 21:31                           ` Daniel Jacobowitz
2006-05-15 21:33                             ` Bob Rossi
2006-05-15 20:11                   ` PAUL GILLIAM
2006-05-15 20:33                     ` Bob Rossi
2006-05-15 21:52                       ` Joel Brobecker
2006-05-15 22:40                     ` Bob Rossi
2006-05-16  3:32                       ` Nick Roberts
2006-05-18  1:40                     ` Bob Rossi
2006-05-18 12:32                       ` Jim Blandy
2006-05-18  7:28       ` Bob Rossi
2006-05-18 16:27 Alain Magloire
2006-05-18 16:55 ` Bob Rossi
2006-05-18 16:59 ` Andreas Schwab
     [not found] ` <vt2bqtvl157.fsf@theseus.home.>
2006-05-18 17:44   ` Bob Rossi
2006-05-18 21:56     ` Jim Blandy
2006-05-19  1:19       ` Bob Rossi
2006-05-19  3:00         ` Daniel Jacobowitz
2006-05-19 12:49           ` Bob Rossi
2006-05-19 15:37             ` Daniel Jacobowitz
2006-05-19 15:56               ` Bob Rossi
2006-05-19 17:55                 ` Jim Blandy
2006-05-19 19:22                   ` Bob Rossi
2006-05-23  3:46                     ` Jim Blandy
2006-05-18 22:51     ` Andreas Schwab
2006-05-18 23:25       ` Bob Rossi
2006-05-19  1:17         ` Andreas Schwab
2006-05-18 23:28       ` Jim Blandy
2006-05-19  0:59         ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vt23bfb871s.fsf@theseus.home. \
    --to=jimb@codesourcery.com \
    --cc=bob_rossi@cox.net \
    --cc=gdb@sourceware.org \
    --cc=nickrob@snap.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox