From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 6/7] Move fixup_partial_die to partial_die_info::fixup
Date: Thu, 25 Jan 2018 12:59:00 -0000 [thread overview]
Message-ID: <7ec76915-7c39-04dc-4903-918531056500@redhat.com> (raw)
In-Reply-To: <1516873114-7449-7-git-send-email-yao.qi@linaro.org>
On 01/25/2018 09:38 AM, Yao Qi wrote:
> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
> index 0ee102a..9b6f2ec 100644
> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2read.c
> @@ -1410,6 +1410,11 @@ struct partial_die_info
> load_partial_dies. */
> partial_die_info& operator=(const partial_die_info& rhs) = delete;
>
> + /* Adjust the partial die before generating a symbol for it. This
> + function may set the is_external flag or change the DIE's
> + name. */
> + void fixup (struct dwarf2_cu *cu);
> +
> /* Offset of this DIE. */
> const sect_offset sect_off;
>
> @@ -1442,9 +1447,6 @@ struct partial_die_info
> /* Flag set if any of the DIE's children are template arguments. */
> unsigned int has_template_arguments : 1;
>
> - /* Flag set if fixup_partial_die has been called on this die. */
> - unsigned int fixup_called : 1;
> -
> /* Flag set if DW_TAG_imported_unit uses DW_FORM_GNU_ref_alt. */
> unsigned int is_dwz : 1;
>
> @@ -1519,10 +1521,13 @@ struct partial_die_info
> has_byte_size = 0;
> has_const_value = 0;
> has_template_arguments = 0;
> - fixup_called = 0;
> + m_fixup_called = false;
> is_dwz = 0;
> spec_is_dwz = 0;
> }
> +
> + /* Flag set if fixup has been called on this die. */
> + bool m_fixup_called : 1;
> };
Currently, the boolean bits were all together for packing.
This moves the bit away from the others, after some pointer
fields, I think. This is probably growing the size of
the structure with some padding holes.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-01-25 12:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 9:38 [PATCH 0/7] Class-fy partial_die_info Yao Qi
2018-01-25 9:38 ` [PATCH 7/7] Move read_partial_die to partial_die_info::read Yao Qi
2018-01-29 1:58 ` Simon Marchi
2018-01-25 9:38 ` [PATCH 1/7] Re-write partial_die_info allocation in load_partial_dies Yao Qi
2018-01-25 9:38 ` [PATCH 5/7] Remove one argument abbrev_len in read_partial_die Yao Qi
2018-01-29 1:30 ` Simon Marchi
2018-01-25 9:38 ` [PATCH 6/7] Move fixup_partial_die to partial_die_info::fixup Yao Qi
2018-01-25 12:59 ` Pedro Alves [this message]
2018-01-25 14:45 ` Yao Qi
2018-01-25 9:38 ` [PATCH 3/7] Change find_partial_die_in_comp_unit to dwarf2_cu::find_partial_die Yao Qi
2018-01-25 9:38 ` [PATCH 2/7] Don't check abbrev is NULL in read_partial_die Yao Qi
2018-01-25 9:38 ` [PATCH 4/7] Class-fy partial_die_info Yao Qi
2018-01-25 16:19 ` Tom Tromey
2018-01-26 17:25 ` Yao Qi
2018-01-26 20:55 ` Tom Tromey
2018-01-29 1:15 ` Simon Marchi
2018-01-30 10:49 ` Yao Qi
2018-01-30 15:11 ` Pedro Alves
2018-01-30 11:39 ` Pedro Alves
2018-01-31 3:46 ` Simon Marchi
2018-01-31 11:55 ` Yao Qi
2018-01-31 15:33 ` Pedro Alves
2018-01-25 12:05 ` [PATCH 0/7] " Joel Brobecker
2018-01-25 14:03 ` Yao Qi
2018-02-22 15:36 [PATCH 0/7 v2] " Yao Qi
2018-02-22 15:36 ` [PATCH 6/7] Move fixup_partial_die to partial_die_info::fixup Yao Qi
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=7ec76915-7c39-04dc-4903-918531056500@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.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).