[patch 2/3] reset pagination counts even when stdin is not a tty

Sandra Loosemore sandra@codesourcery.com
Fri Dec 18 19:44:00 GMT 2015


In testing gdb.base/paginate-bg-execution.exp on a remote Windows host 
via ssh -T, I observed this output:

set height 2
(gdb) PASS: gdb.base/paginate-bg-execution.exp: paginate: set height 2
continue&
---Type <return> to continue, or q <return> to quit---ERROR: Window too 
small.
UNRESOLVED: gdb.base/paginate-bg-execution.exp: paginate: continue&

E.g., it was giving the pagination prompt in a place the testcase wasn't 
expecting.  I tracked this down to the count of lines already printed 
not being reset properly with each command.  The call to 
reinitialize_more_filter is presently conditional on stdin being a tty, 
but the pagination logic itself clearly is not so conditionalized (if it 
were, I'd not be seeing any pagination prompting at all when testing in 
this configuration).  So the obvious fix seems to be to remove that 
extra condition.  Now the output from that snippet is:

set height 2
(gdb) PASS: gdb.base/paginate-bg-execution.exp: paginate: set height 2
continue&
Continuing.
(gdb) PASS: gdb.base/paginate-bg-execution.exp: paginate: continue&

and the pagination prompts do appear in the subsequent tests, same as in 
the Linux-host testing with a TTY.

OK to commit?

-Sandra

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb-paginate-2.log
Type: text/x-log
Size: 204 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20151218/d9cf637d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb-paginate-2.patch
Type: text/x-patch
Size: 1037 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20151218/d9cf637d/attachment-0001.bin>


More information about the Gdb-patches mailing list