]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/ChangeLog
Fix the "winheight" command
authorTom Tromey <tom@tromey.com>
Sat, 26 Oct 2019 22:56:27 +0000 (16:56 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 19 Nov 2019 20:27:25 +0000 (13:27 -0700)
commit9f6ad286efc0edf7d0cdb8a4126a23d38a267f8d
treeffc49d645384be569e25d409d9abfd659eb74d00
parent435d3d88360d1ad9aac798f6bff7d7b5363efe3e
Fix the "winheight" command

The "winheight" command is broken.  I probably broke it in one of my
TUI refactoring patches, though I didn't track down exactly which one.

The bug is that the code does:

  *buf_ptr = '\0';

... but then never advances buf_ptr past this point, so no window name
is seen.

This patch refactors the code a bit so that a copy of the argument
string is not needed, also fixing the bug.

A new test case is included.

gdb/ChangeLog
2019-11-19  Tom Tromey  <tom@tromey.com>

* tui/tui-win.c (tui_partial_win_by_name): Move from tui-data.c.
Now static.  Change type of "name".
(tui_set_win_height_command): Don't copy "arg".
* tui/tui-data.h (tui_partial_win_by_name): Don't declare.
* tui/tui-data.c (tui_partial_win_by_name): Move to tui-win.c.

gdb/testsuite/ChangeLog
2019-11-19  Tom Tromey  <tom@tromey.com>

* gdb.tui/winheight.exp: New file.

Change-Id: I0871e93777a70036dbec9c9543f862f42e3a81e5
gdb/ChangeLog
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.tui/winheight.exp [new file with mode: 0644]
gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/tui/tui-win.c