From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19076 invoked by alias); 24 Oct 2014 18:44:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 19021 invoked by uid 89); 24 Oct 2014 18:44:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 24 Oct 2014 18:44:39 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9OIiQRi029724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 24 Oct 2014 14:44:26 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9OIiNfc004659; Fri, 24 Oct 2014 14:44:24 -0400 Message-ID: <544A9E07.9090905@redhat.com> Date: Fri, 24 Oct 2014 18:44:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: CustaiCo , gdb-patches@sourceware.org Subject: Re: [PATCH] [PR gdb/16762 gdb/15958] Fixes for properly resizing TUI References: <5436b07f.25f9440a.540c.4c6fSMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <5436b07f.25f9440a.540c.4c6fSMTPIN_ADDED_MISSING@mx.google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-10/txt/msg00667.txt.bz2 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 . 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