public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <kseitz@firetalk.com>
To: leonp@plris.com
Cc: Insight <insight@sourceware.cygnus.com>
Subject: Re: Ctrl-C strange behavior
Date: Thu, 04 May 2000 09:10:00 -0000	[thread overview]
Message-ID: <3911A0F2.86750022@firetalk.com> (raw)
In-Reply-To: <390F039B.4DE491@plris.com>

Leon Pollak wrote:
> 
> Hello, gurus.
>     Please, can somebody describe rather strange behavior of Ctrl-C that I have?
>     I run Insight from xterm and the program downloads to the target and starts to run.
>     When I press Ctrl-C in command window, press "STOP" button or try close Insignt -
>     nothing happens.
>     Even the windows are not redrawn and remain blank if I minimize them.
>     But when I press Ctrl-C from the xterm window, Insignt says that it  received
>     SGINT interrupt and stops the target.
> 

Sigh. Read my previous message to this group under the same subject for
a basic description of the things going on behind the scenes and Chris
Faylor's message for a possible solution.

Now, onto the "weird" behavior: gdbtk does not know how to deal with
terminals very well. For example, stdin/stdout/stderr all map to gdbtk's
controlling terminal (usually the xterm from which you launched gdbtk).
So an interrupt to this controlling terminal will cause gdbtk to attempt
to interrupt the target.

Just think of gdbtk rerouting all output to stdout (gdb's stdout) to the
console window. The problem is that all inferior I/O still goes through
the xterm, just like when you use the command line. So when you hit ^C
in the terminal from which gdbtk was launched, you are sending the
inferior a signal, SIGINT, which gdb catches. Fun, eh? No one has yet to
attempt to fix this properly (for remotes), but Tom Tromey had a
solution to this for natives quite some time ago.

(This is also the reason why you cannot use gdbtk by double-clicking it
in a window manager. Gdbtk MUST have a controlling terminal, so you MUST
launch it from a shell. Code Fusion works around this problem by giving
gdbtk a controlling terminal. Tom's solution is the similar, but it
teaches gdb how to get its own controlling terminal.)

Boy, I sound like the bearer of bad news today...
Keith
-- 
Why chat when you can Firetalk?
Firetalk ID: Keith (10320)
www.firetalk.com

  reply	other threads:[~2000-05-04  9:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-02 10:32 Leon Pollak
2000-05-04  9:10 ` Keith Seitz [this message]
2000-05-03 17:00 Scott A Sumner
2000-05-03 17:45 ` Chris Faylor
2000-05-04  8:58 ` Keith Seitz
2000-05-05 13:30 Scott A Sumner
2000-05-12 11:11 ` Elena Zannoni
2000-05-16 11:08 Will Lentz
2000-05-22  7:58 ` Elena Zannoni
2000-05-22  9:14 Will Lentz
2000-05-22  9:18 ` Elena Zannoni

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=3911A0F2.86750022@firetalk.com \
    --to=kseitz@firetalk.com \
    --cc=insight@sourceware.cygnus.com \
    --cc=leonp@plris.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).