Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 0/4] layout command changes
Date: Thu, 21 May 2015 08:12:00 -0000	[thread overview]
Message-ID: <555D937D.4010800@redhat.com> (raw)
In-Reply-To: <cover.1432163460.git.andrew.burgess@embecosm.com>

On 05/21/2015 12:17 AM, Andrew Burgess wrote:
> This patch set replaces an earlier patch I posted here:
>   https://sourceware.org/ml/gdb-patches/2015-04/msg00185.html
> 
> In the previous patch I had to jump through some hoops in order to
> support completion of the layout names like $FREGS.  This was pretty
> annoying as I had not realised these layouts existed until I started
> writting the completer code...
> 
> ...but it turns out that those layout names don't work anyway, and
> have not done so for some time.  I didn't figure out exactly when they
> broke, but I believe they were broken in 6.8.
> 
> Still, it doesn't matter, as we have the 'tui regs' command, which
> does work, and does allow the register set displayed in tui to be
> changed.  This is for the best anyway (I think), personally, I felt
> that managing both the layout, and the choice of register set all from
> the layout command was too much overloading.
> 
> The first patch in this series removes the $FREGS style register set
> names from the layout command, and cleans up all of the code relating
> to them.

Looks like this was really meant to switch to the matching registers
layout when the user did "display $fpregs", etc. instead of manually
specifying that layout.  We have:

static void
display_command (char *arg, int from_tty)
{
  struct format_data fmt;
  struct expression *expr;
  struct display *newobj;
  int display_it = 1;
  const char *exp = arg;

#if defined(TUI)
  /* NOTE: cagney/2003-02-13 The `tui_active' was previously
     `tui_version'.  */
  if (tui_active && exp != NULL && *exp == '$')
    display_it = (tui_set_layout_for_display_command (exp) == TUI_FAILURE);
#endif

Doesn't your series effectively make this bit in display_command dead?
(while before it would switch on the registers layout).  (We should probably
rename tui_set_layout_for_display_command too.)

I had never noticed these special register layouts before either.  I'm not
at all adverse to removing them.  Not all expressions that start with $ are
registers, and probably a better idea would be to have
a separate "displays" window (so displays would go to that window
instead of the command window when the TUI is active), so that the tui
could neatly show watched variables/random expressions too.

> 
> The second patch is a much simpler version of command completion
> support for layout names.
> 
> The third and forth patches fix small tui related issues that I
> spotted during testing.


Thanks,
Pedro Alves


  parent reply	other threads:[~2015-05-21  8:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 23:17 Andrew Burgess
2015-05-20 23:18 ` [PATCH 4/4] gdb: Add cleanup to avoid memory leak on error Andrew Burgess
2015-05-20 23:18 ` [PATCH 3/4] gdb: Don't call tui_enable too early Andrew Burgess
2015-05-20 23:18 ` [PATCH 2/4] gdb: Add completer for layout command Andrew Burgess
2015-05-21  0:25   ` Keith Seitz
2015-05-21  7:10     ` Andrew Burgess
2015-05-20 23:18 ` [PATCH 1/4] gdb: Remove register class specific layout names Andrew Burgess
2015-05-21  8:42   ` Pedro Alves
2015-05-21 11:33     ` Andrew Burgess
2015-05-21 11:34       ` Pedro Alves
2015-05-21 12:25   ` Andrew Burgess
2015-05-21 13:17     ` Pedro Alves
2015-05-21  8:12 ` Pedro Alves [this message]
2015-05-21  8:35   ` [PATCH 0/4] layout command changes Pedro Alves

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=555D937D.4010800@redhat.com \
    --to=palves@redhat.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    /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