From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH 4/4] gdb: remove TYPE_FIELDS macro
Date: Fri, 22 May 2020 14:23:49 -0600 [thread overview]
Message-ID: <874ks73ei2.fsf@tromey.com> (raw)
In-Reply-To: <20200519184441.7838-4-simon.marchi@efficios.com> (Simon Marchi via Gdb-patches's message of "Tue, 19 May 2020 14:44:41 -0400")
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
Simon> Remove all uses of the `TYPE_FIELDS` macro. Replace them with either:
Simon> 1) type::fields, to obtain a pointer to the fields array (same as
Simon> TYPE_FIELDS yields)
Simon> 2) type::field, a new convenience method that obtains a reference to one
Simon> of the type's field by index. It is meant to replace
Simon> TYPE_FIELDS (type)[idx]
I suppose a future patch will remove the TYPE_FIELD macro?
Simon> - TYPE_FIELDS (type) = (struct field *)
Simon> - TYPE_ZALLOC (type, sizeof (struct field) * count);
Simon> + type->set_fields
Simon> + ((struct field *) TYPE_ZALLOC (type, sizeof (struct field) * count));
Simon> TYPE_UNSIGNED (type) = 1;
Technically I suppose this should be in the earlier patch.
Anyway this looks good.
Tom
next prev parent reply other threads:[~2020-05-22 20:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 18:44 [PATCH 1/4] gdb: add type::num_fields / type::set_num_fields Simon Marchi
2020-05-19 18:44 ` [PATCH 2/4] gdb: remove TYPE_NFIELDS macro Simon Marchi
2020-05-22 20:20 ` Tom Tromey
2020-05-19 18:44 ` [PATCH 3/4] gdb: add type::fields / type::set_fields Simon Marchi
2020-05-22 20:21 ` Tom Tromey
2020-05-19 18:44 ` [PATCH 4/4] gdb: remove TYPE_FIELDS macro Simon Marchi
2020-05-22 20:23 ` Tom Tromey [this message]
2020-05-22 20:58 ` Simon Marchi
2020-05-22 20:16 ` [PATCH 1/4] gdb: add type::num_fields / type::set_num_fields Tom Tromey
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=874ks73ei2.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).