]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: move setbuf calls out of gdb_readline_no_editing_callback
authorAndrew Burgess <aburgess@redhat.com>
Sun, 24 Apr 2022 15:39:19 +0000 (08:39 -0700)
committerJoel Brobecker <brobecker@adacore.com>
Sun, 24 Apr 2022 15:44:02 +0000 (08:44 -0700)
commite312dfbe9556d8e4557abe7fd3f1a4681e15da06
tree63833c46cbd74a8fe05f51170a119f650486fecc
parent3ab22dba1b7ef469b743e5606731ebc1169fbafa
gdb: move setbuf calls out of gdb_readline_no_editing_callback

After this commit:

  commit d08cbc5d3203118da5583296e49273cf82378042
  Date:   Wed Dec 22 12:57:44 2021 +0000

      gdb: unbuffer all input streams when not using readline

Issues were reported with some MS-Windows hosts, see the thread
starting here:

  https://sourceware.org/pipermail/gdb-patches/2022-March/187004.html

Filed in bugzilla as: PR mi/29002

The problem seems to be that calling setbuf on terminal file handles
is not always acceptable, see this mail for more details:

  https://sourceware.org/pipermail/gdb-patches/2022-April/187310.html

This commit does two things, first moving the setbuf calls out of
gdb_readline_no_editing_callback so that we don't end up calling
setbuf so often.

Then, for MS-Windows hosts, we don't call setbuf for terminals, this
appears to resolve the issues that have been reported.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29002
gdb/event-top.c
gdb/top.c