[PATCH] Fix logging redirection bug with pager

Tom de Vries tdevries@suse.de
Mon Jan 3 12:32:12 GMT 2022


On 12/30/21 09:36, Tom Tromey wrote:
> Simon>  41 set pagination on^M
> Simon>  42 (gdb) PASS: gdb.base/page-logging.exp: set pagination on
> Simon>  43 ^M</binutils-gdb/gdb/testsuite/outputs/gdb.base/page-logging/log.txt^M
> Simon>  44 (gdb) FAIL: gdb.base/page-logging.exp: set logging filename
> 
> Simon> I don't have time to dig right now, but I can do so if needed when
> Simon> coming back from the holidays, if you can't reproduce.  I see it on Arch
> Simon> Linux and on Ubuntu.
> 

I also ran into this on openSUSE Leap 15.3.

> It seems to work fine here:
> 
>      $ runtest page-logging.exp
>      [...]
>                      === gdb Summary ===
> 
>      # of expected passes		8
> 

And I also reproduced this with fedora 34.

I guess it's about the "set logging file" command being longer than the 
"width 100" that is used in the test-case.  If I change it to 150, the 
test passes for me, f.i. on openSUSE like this:
...
(gdb) PASS: gdb.base/page-logging.exp: set pagination on
set logging file 
/home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.base/page-logging/log.txt^M
(gdb) PASS: gdb.base/page-logging.exp: set logging filename
...

Note that the "set logging file" command length is 105 chars.

Thanks,
- Tom


More information about the Gdb-patches mailing list