This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [PR gdb/16762 gdb/15958] Fixes for properly resizing TUI


Hi!

Thanks much for tackling this.

Do you have a copyright assignment on file?  We will need it before
we can accept the changes.

See <http://sourceware.org/gdb/wiki/ContributionChecklist>.

If you haven't filed it yet, please contact me off-list and I
will get you started.

(I haven't really looked at the patch.)

-- 
Pedro Alves

On 10/09/2014 04:02 PM, CustaiCo wrote:
> This patch is to fix Bug 16762 - GDB doesn't update display size when host
> terminal resize, and it inadvertently fixes Bug 15958 - readline modifies
> env (LINES+COLUMNS) as well.
> 
> Before it was getting it's size data from curses, but curses is not
> available to the readline based interface, so things would get out of sync.
> The readline based interface had no way at all to know if there had been
> any changes to the size of the window. 
> 
> I have changed it so that both the sides use the same callback function. The
> event handler has been changed to call some clean up operations that
> readlines needs and then puts in a request to call the resize function in 
> the main event loop on the next pass. It does change a couple new parameters
> that readline 6.3 introduces, rl_change_environment and rl_prefer_env_winsize
> They make it so readline does not set ROWS or COLUMNS in the environment,
> and seems to be suggested by the ncurses FAQ [1]. The previous method
> that handedled resizing after getting input from curses, along with some
> support code, has been removed.
> 
> The only problem I am aware of with this patch is that until the first
> character is typed after resizing in curses mode, you do not see
> the contents of the command window. This seems to have no impact on any
> other function. Resizing with, without, or any number of switches in
> between curses and readline modes were unable to produce a out of sync
> size report for me. Without the patch, any resize operation shrinks the
> size of the command portion of the window to 3 lines, which is retained
> as the full height of the screen in readline mode until you exit the 
> session.
> 
> I see no regressions in the test suite, even though this isn't the
> sort of issue that automated testing is very good at.
> 
> CustaiCo
> 
> [1] http://invisible-island.net/ncurses/ncurses.faq.html#handle_resize
> 
>                 === gdb Summary ===
> 
> # of expected passes            28624
> # of unexpected failures        98
> # of unexpected successes       1
> # of expected failures          58
> # of known failures             55
> # of unresolved testcases       12
> # of untested testcases         46
> # of unsupported tests          184
> 
> ---
>  gdb/ChangeLog      | 14 ++++++++++++++
>  gdb/tui/tui-data.c | 16 ----------------
>  gdb/tui/tui-io.c   | 21 ---------------------
>  gdb/tui/tui-win.c  | 40 +++++++++++++++++++++++++++++++++++-----
>  gdb/utils.c        |  7 +++++--
>  5 files changed, 54 insertions(+), 44 deletions(-)
> 


Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]