Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: Can symbol-reading produce terminal output?
Date: Mon, 11 May 2009 10:11:00 -0000	[thread overview]
Message-ID: <20090511101114.GC14773@adacore.com> (raw)
In-Reply-To: <83tz3ubd0h.fsf@gnu.org>

> blockframe.c:find_pc_partial_function has this comment and code:
> 
> 	  /* Need to get the terminal in case symbol-reading produces
> 	     output.  */
> 	  target_terminal_ours_for_output ();
> 	  PSYMTAB_TO_SYMTAB (pst);
> 
> But the other callers of PSYMTAB_TO_SYMTAB do no such thing.  Which
> one is right?  I volunteer to fix those that are wrong, once I know
> which ones are they.

I don't know of any rule that one should call, or not,
target_terminal_ours_for_output before we call PSYMTAB_TO_SYMTAB.
That being said, it's really odd that find_pc_partial_function has
the side-effect of potentially switching the terminal to GDB.

If we were doing things in a more systematic way, I'd say that this
call belongs in the code that handles kernel events. The terminal
should be the inferior's when we're waiting for events, and it should
be ours when we're no longer waiting (either processing an event, or
waiting for the next user command). That reminds me, though: What do
we do when we're in non-stop mode???

I couldn't get much info about this particular use of terminal_ours
from CVS (actually, I used the git mirror :-), as this predates
the CVS repo...  Perhaps we could simply try removing it.

-- 
Joel


  reply	other threads:[~2009-05-11 10:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-09 13:51 Eli Zaretskii
2009-05-11 10:11 ` Joel Brobecker [this message]
2009-05-11 10:26   ` Pedro Alves

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=20090511101114.GC14773@adacore.com \
    --to=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /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