From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9852 invoked by alias); 16 Jan 2015 16:59:23 -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 7937 invoked by uid 89); 16 Jan 2015 16:59:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD 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, 16 Jan 2015 16:59:09 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0GGx6lf002310 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 16 Jan 2015 11:59:07 -0500 Received: from localhost (dhcp-10-15-16-169.yyz.redhat.com [10.15.16.169]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0GGx5TG010557 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Fri, 16 Jan 2015 11:59:06 -0500 From: Sergio Durigan Junior To: Eli Zaretskii Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCHSET] [2/4] Fix various issue in TUI References: <83y4pnbtnc.fsf@gnu.org> <54AAE1D9.9000409@redhat.com> <834ms39a40.fsf@gnu.org> <54AD392C.1030209@redhat.com> <83oapy1yel.fsf@gnu.org> X-URL: http://blog.sergiodj.net Date: Fri, 16 Jan 2015 16:59:00 -0000 In-Reply-To: <83oapy1yel.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 16 Jan 2015 18:30:10 +0200") Message-ID: <87lhl27jc6.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00471.txt.bz2 On Friday, January 16 2015, Eli Zaretskii wrote: > Here's what I pushed: > > commit 6cdb25f4df143e8d98bd71bf943bbe61c702e239 > Author: Eli Zaretskii > Date: Fri Jan 16 18:24:16 2015 +0200 > > Make setting TUI border attributes take effect immediately > > gdb/ > 2015-01-16 Eli Zaretskii > > * tui/tui-win.c (tui_rehighlight_all, tui_set_var_cmd): New > functions. > (_initialize_tui_win) : > : Use tui_set_var_cmd as the "set" function. > * tui/tui-win.h: Add prototype for tui_rehighlight_all. Hi Eli, This patch does not compile on x86_64 with --enable-targets=all. You can see the failures here: > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 661f9b6..e45f5c1 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,5 +1,11 @@ > 2015-01-16 Eli Zaretskii > > + * tui/tui-win.c (tui_rehighlight_all, tui_set_var_cmd): New > + functions. > + (_initialize_tui_win) : > + : Use tui_set_var_cmd as the "set" function. > + * tui/tui-win.h: Add prototype for tui_rehighlight_all. > + > * tui/tui-win.c (tui_scroll_left_command, tui_scroll_right_command): > Doc fix. > (tui_set_tab_width_command): Delete and recreate the source and > diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c > index 96fa801..7e9bd1e 100644 > --- a/gdb/tui/tui-win.c > +++ b/gdb/tui/tui-win.c > @@ -344,6 +344,15 @@ struct cmd_list_element ** > return &tuilist; > } > > +/* The set_func hook of "set tui ..." commands that affect the window > + borders on the TUI display. */ > +void > +tui_set_var_cmd (char *null_args, int from_tty, struct cmd_list_element *c) > +{ > + if (tui_update_variables () && tui_active) > + tui_rehighlight_all (); > +} > + > /* Function to initialize gdb commands, for tui window > manipulation. */ > > @@ -420,7 +429,7 @@ Set the width (in characters) of tab stops.\n\ > space use a white space\n\ > ascii use ascii characters + - | for the border\n\ > acs use the Alternate Character Set"), > - NULL, > + tui_set_var_cmd, > show_tui_border_kind, > &tui_setlist, &tui_showlist); > > @@ -436,7 +445,7 @@ Set the width (in characters) of tab stops.\n\ > half-standout use half bright and standout mode\n\ > bold use extra bright or bold\n\ > bold-standout use extra bright or bold with standout mode"), > - NULL, > + tui_set_var_cmd, > show_tui_border_mode, > &tui_setlist, &tui_showlist); > > @@ -452,7 +461,7 @@ Set the width (in characters) of tab stops.\n\ > half-standout use half bright and standout mode\n\ > bold use extra bright or bold\n\ > bold-standout use extra bright or bold with standout mode"), > - NULL, > + tui_set_var_cmd, > show_tui_active_border_mode, > &tui_setlist, &tui_showlist); > } > @@ -646,6 +655,14 @@ Set the width (in characters) of tab stops.\n\ > tui_show_locator_content (); > } > > +void > +tui_rehighlight_all (void) > +{ > + enum tui_win_type type; > + > + for (type = SRC_WIN; type < MAX_MAJOR_WINDOWS; type++) > + tui_check_and_display_highlight_if_needed (tui_win_list[type]); > +} > > /* Resize all the windows based on the terminal size. This function > gets called from within the readline sinwinch handler. */ > diff --git a/gdb/tui/tui-win.h b/gdb/tui/tui-win.h > index 6601d4b..7d77a00 100644 > --- a/gdb/tui/tui-win.h > +++ b/gdb/tui/tui-win.h > @@ -55,4 +55,7 @@ extern void tui_scroll (enum tui_scroll_direction, > /* Create or get the TUI command list. */ > struct cmd_list_element **tui_get_cmd_list (void); > > +/* Set a TUI variable. */ > +void tui_set_var_cmd (char *, int, struct cmd_list_element *); > + > #endif -- Sergio GPG key ID: 0x65FC5E36 Please send encrypted e-mail if possible http://sergiodj.net/