public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "dje at google dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug cli/17222] New: printf_filtered vs printf_unfiltered
Date: Fri, 01 Aug 2014 16:58:00 -0000	[thread overview]
Message-ID: <bug-17222-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=17222

            Bug ID: 17222
           Summary: printf_filtered vs printf_unfiltered
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: minor
          Priority: P2
         Component: cli
          Assignee: unassigned at sourceware dot org
          Reporter: dje at google dot com

[this is more than just a cli issue, but figured it's as good a component as
any]

This pr was triggered by this code in infrun.c:

    if (cmd_done
        && !was_sync
        && exec_done_display_p
        && (ptid_equal (inferior_ptid, null_ptid)
            || !is_running (inferior_ptid)))
      printf_unfiltered (_("completed.\n"));

Why printf_unfiltered?
At the least it would be good to add some docs somewhere (internals manual?
utils.[ch]?) guidelines for when to use one or the other.

That reminded me of another issue.
We go to some lengths to make sure we've done target_terminal_ours_for_output
before we print something (in cases where the terminal might be owned by the
inferior), but we don't make any similar effort for debugging output (nor
should we, at least in the general case).  But it's not clear to me what the
consequences of this, if any, are.  We should get that documented somewhere. 
And if there are no consequences, let's still get that documented.  [And if it
is already documented, awesome.  I skimmed utils.[ch] and the wiki and didn't
find anything.]

-- 
You are receiving this mail because:
You are on the CC list for the bug.


             reply	other threads:[~2014-08-01 16:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 16:58 dje at google dot com [this message]
2014-08-31 22:11 ` [Bug cli/17222] " xdje42 at gmail dot com
2021-12-27  6:31 ` tromey at sourceware dot org

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=bug-17222-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).