[PATCH 0/4] Audit uses of unfiltered output to gdb_stdout
Tom Tromey
tom@tromey.com
Sat Jan 8 23:19:11 GMT 2022
Tom> This makes the whole analysis phase a lot easier, and I think it means I
Tom> can remove printf_unfiltered entirely. The only other spot that truly
Tom> needs this is complete_command, and that can be fixed with this same
Tom> scoped_restore.
I looked at this a bit more, and in the end I think I'll probably keep
printf_unfiltered around. It's easy to fix complete_command, and infrun
takes care of itself, but there's also display_gdb_prompt and
gdb_readline_no_editing. And, annotate.c currently mostly uses
_filtered, that seems pretty weird to me, and I think it would be better
to switch that code to _unfiltered. (annotate is weird because
presumably the user also disables pagination -- did this used to be
automatic? Emacs seems to page for me -- but this particular output
seems like it ought to be invisible.)
Anyway the burden of keeping it around is pretty low. And it's easy
enough to remove it in the end if we decide to go that route.
Tom
More information about the Gdb-patches
mailing list