aboutsummaryrefslogtreecommitdiff
path: root/gdb/bt-utils.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-01-03 09:48:37 -0700
committerTom Tromey <tromey@adacore.com>2022-01-05 06:49:08 -0700
commit93f3b8eeaac14fe1d9343ce1b8eca87be2ce5843 (patch)
treeecabfa0adc00be7840c212b6bee26b752665f2b2 /gdb/bt-utils.c
parent74e315dbfe5200c473b226e937935fb8ce391489 (diff)
downloadbinutils-93f3b8eeaac14fe1d9343ce1b8eca87be2ce5843.zip
binutils-93f3b8eeaac14fe1d9343ce1b8eca87be2ce5843.tar.gz
binutils-93f3b8eeaac14fe1d9343ce1b8eca87be2ce5843.tar.bz2
Fix pager regression
The patch to fix paging with redirection caused a regression in the internal AdaCore test suite. The problem occurs when running an MI command from the CLI using interpreter-exec, when paging is enabled. This scenario isn't covered by the current test suite, so this patch includes a new test. The problem is that, in this situation, MI does: fputs_unfiltered (strcmp (context->command, "target-select") == 0 ? "^connected" : "^done", mi->raw_stdout); Here raw_stdout is a stdio_file wrapping stdout, so the pager thinks that it is ok to buffer the output. However, in this setup, it isn't ok, and flushing the wrap buffer doesn't really work properly. Also, MI next does: mi_out_put (uiout, mi->raw_stdout); ... but this uses ui_file::write, which also doesn't flush the wrap buffer. I think all this will be fixed by the pager rewrite series I'm working on. However, in the meantime, adding the old gdb_stdout check back to the pager fixes this problem. Regression tested on x86-64 Fedora 34.
Diffstat (limited to 'gdb/bt-utils.c')
0 files changed, 0 insertions, 0 deletions