Subject: Re: bug#39179: 27.0.50; [PATCH] Add filter to gdb-mi register buffer

From: Eli Zaretskii <[email-masked]>
Date: Sun, 02 Feb 2020 17:52:31 +0200

> From: Yuan Fu <[email-masked]>
> Date: Sun, 2 Feb 2020 09:32:45 -0500
> Cc: [email-masked]
> 
> >> I mainly use it to display only the registers I care about, say, all
> >> the *dx registers (rdx, edx, dx) or all the r** registers (rdx, rsi,
> >> etc).
> > 
> > I understand, but why wouldn't a simple defcustom do this job?  A list
> > of registers to display is a simple thing, no?
> 
> My main concern is that defcustom wouldn’t be as convenient as the current one. Right now I only need `f + .*dx` and I’m good to go, whereas defcustom I need to go to customize and configure there, and come back.

Sure, but this convenience is only a significant consideration for a
feature that is supposed to be used very frequently.  I don't think
this is so in this case.

> > Really?  In what way?  I could only understand why you'd like to see
> > FP registers in some programs, but not in others.  But other than
> > that, why would you want to see this or that register?  Are you
> > frequently debugging on the machine language level?
> 
> Honestly I only used this for the bomb lab in my CS course last semester where we need to debug assembly code. So if you think in real life scenarios we don’t really need this _quick_ filtering and customize will cut it. I’m fine with that too.

Good, then let's do it via a defcustom.

> Is your main reason of objection the (unnecessary) complexity of the code?

No, my main reason is to avoid unnecessarily cluttering the UI.

> > Then perhaps we should allow reordering the registers instead of
> > filtering their list, so that registers you want to see are at the
> > beginning?
> 
> That would be more complex that just filtering IMO. 

OK.

Thanks.