public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Audit uses of unfiltered output to gdb_stdout
@ 2022-01-06 17:28 Tom Tromey
  2022-01-06 17:28 ` [PATCH 1/4] Send some error output to gdb_stderr Tom Tromey
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Tom Tromey @ 2022-01-06 17:28 UTC (permalink / raw)
  To: gdb-patches

My belief is that some gdb output must be unfiltered -- in particular,
I think infrun is probably not set up to handle a quit thrown from a
paging prompt that was caused by some thread-event user notification.

However, many such calls aren't actually needed, or, if they are
needed, should be sent to either gdb_stderr or gdb_stdlog.

I went through all the text output in gdb, looking for unfiltered
output to gdb_stdout.  This series is the result.

After this, I think all _unfiltered calls that don't explicitly pass a
ui_file (that is, calls like printf_unfiltered and not
fprintf_unfiltered) should remain as unfiltered.  But, all calls that
*do* pass a ui_file are either (1) sending to gdb_stdout and come from
a location that can comfortably be switched to _filtered; or (2) are
sending to some other stream, where filtering is irrelevant.

One final oddity is complete_command.  This is explicitly unfiltered
due to its use by Emacs.  I considered (and even wrote a patch for)
changing the "server" prefix to disable filtering; but in the end I
wasn't sure whether this would break some client.  It seemed horribly
possible to me that some client out there could look for the pager
prompt to limit the number of completions.

This series is the last step before the pager rewrite can be sent.
I've broken things down into sub-series to make review a little less
daunting.  (Note that the wrap_here, Darwin output, and
timestamped_file patches also must land before the pager.)

Regression tested on x86-64 Fedora 34.

Tom



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-01-25 22:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06 17:28 [PATCH 0/4] Audit uses of unfiltered output to gdb_stdout Tom Tromey
2022-01-06 17:28 ` [PATCH 1/4] Send some error output to gdb_stderr Tom Tromey
2022-01-06 17:28 ` [PATCH 2/4] Sent timing stats to gdb_stdlog Tom Tromey
2022-01-06 17:28 ` [PATCH 3/4] Reduce explicit use of gdb_stdout Tom Tromey
2022-01-08 16:57   ` Tom Tromey
2022-01-06 17:28 ` [PATCH 4/4] Always print the "host libthread-db" message to stdout Tom Tromey
2022-01-07 16:49 ` [PATCH 0/4] Audit uses of unfiltered output to gdb_stdout Pedro Alves
2022-01-07 22:18   ` Tom Tromey
2022-01-08 23:19     ` Tom Tromey
2022-01-25 22:11 ` Tom Tromey

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).