Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH 0/4] Move dyn prop functions to be methods of struct type
Date: Thu, 7 May 2020 11:34:29 -0400	[thread overview]
Message-ID: <7ac66284-cc6f-442a-dd2e-1d838ec0d3d3@simark.ca> (raw)
In-Reply-To: <6bd477ef-bfe4-8570-be9e-deac5a32400c@simark.ca>

On 2020-05-07 10:07 a.m., Simon Marchi wrote:
> On 2020-05-07 9:59 a.m., Tom Tromey wrote:
>>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>>
>> Simon> I'd like to start cleaning up gdbtypes.h.  In particular, move some functions
>> Simon> and some of the TYPE_* macros to be methods of `struct type`.  To test the
>> Simon> waters, I started with the dynamic property stuff, which is quite isolated.
>>
>> Looks good to me.  I support this project in general; I don't think
>> macros of this form really add value.  There's been a time or two in the
>> past where we were able to use the macros to change the representation a
>> little -- but that's even easier with methods.
> 
> Yeah, it might have made sense before C++.
> 
> There is one small thing I would change in this patch series.  I have progressed a bit
> on that front (changed more macros to methods) and realized I probably don't want to
> use the prefix `get_` in the getters.  It makes it long and verbose for nothing.
> 
>   type->get_field (0)->get_type ()->get_name ()
> 
> vs
> 
>   type->field (0)->type ()->name ()
> 
> Plus, existing getters on the objfile struct, for example, don't use get, so it would
> be more consistent.  So before pushing, I would change patch 1 to rename get_dyn_prop
> to just dyn_prop.

I pushed the series with that changed.

Simon


      reply	other threads:[~2020-05-07 15:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30 18:17 Simon Marchi
2020-04-30 18:17 ` [PATCH 1/4] gdb: make get_dyn_prop a method " Simon Marchi
2020-04-30 18:17 ` [PATCH 2/4] gdb: make add_dyn_prop " Simon Marchi
2020-04-30 18:17 ` [PATCH 3/4] gdb: make remove_dyn_prop " Simon Marchi
2020-04-30 18:17 ` [PATCH 4/4] gdb: remove TYPE_DYN_PROP_LIST macro Simon Marchi
2020-05-07 13:58   ` Tom Tromey
2020-05-07 14:15     ` Simon Marchi
2020-05-07 13:59 ` [PATCH 0/4] Move dyn prop functions to be methods of struct type Tom Tromey
2020-05-07 14:07   ` Simon Marchi
2020-05-07 15:34     ` Simon Marchi [this message]

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=7ac66284-cc6f-442a-dd2e-1d838ec0d3d3@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --cc=tom@tromey.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