Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCHSET] [2/4] Fix various issue in TUI
Date: Fri, 16 Jan 2015 16:59:00 -0000	[thread overview]
Message-ID: <87lhl27jc6.fsf@redhat.com> (raw)
In-Reply-To: <83oapy1yel.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 16 Jan	2015 18:30:10 +0200")

On Friday, January 16 2015, Eli Zaretskii wrote:

> Here's what I pushed:
>
> commit 6cdb25f4df143e8d98bd71bf943bbe61c702e239
> Author: Eli Zaretskii <eliz@gnu.org>
> Date:   Fri Jan 16 18:24:16 2015 +0200
>
>     Make setting TUI border attributes take effect immediately
>     
>     gdb/
>     2015-01-16  Eli Zaretskii  <eliz@gnu.org>
>     
>          * tui/tui-win.c (tui_rehighlight_all, tui_set_var_cmd): New
>          functions.
>          (_initialize_tui_win) <border-kind, border-mode>:
>          <active-border-mode>: 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:

  <http://gdb-build.sergiodj.net/builders/Fedora-x86_64-native-extended-gdbserver-m32/builds/14/steps/compile/logs/stdio>

> 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  <eliz@gnu.org>
>  
> +	* tui/tui-win.c (tui_rehighlight_all, tui_set_var_cmd): New
> +	functions.
> +	(_initialize_tui_win) <border-kind, border-mode>:
> +	<active-border-mode>: 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/


  reply	other threads:[~2015-01-16 16:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-31 17:45 Eli Zaretskii
2015-01-05 19:11 ` Pedro Alves
2015-01-05 19:40   ` Eli Zaretskii
2015-01-06 16:03     ` Pedro Alves
2015-01-06 15:58   ` Eli Zaretskii
2015-01-07 13:48     ` Pedro Alves
2015-01-16 16:29       ` Eli Zaretskii
2015-01-16 16:59         ` Sergio Durigan Junior [this message]
2015-01-16 17:59           ` Eli Zaretskii
2015-01-16 16:34   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lhl27jc6.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox