From: Simon Marchi <simon.marchi@ericsson.com>
To: "Maciej W. Rozycki" <macro@imgtec.com>, <gdb-patches@sourceware.org>
Cc: Yao Qi <qiyaoltc@gmail.com>
Subject: Re: [PATCH v2] gdbarch: Use an anonymous union for target data in `gdbarch_info'
Date: Tue, 01 Aug 2017 18:34:00 -0000 [thread overview]
Message-ID: <70ac03dc-a681-d54f-bead-00e6829835e1@ericsson.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1707291508210.29991@tp.orcam.me.uk>
On 2017-08-01 05:52 PM, Maciej W. Rozycki wrote:
> As an update to commit ede5f15146ae ("gdbarch.h: Change
> gdbarch_info::tdep_info's type to void *") replace the definition of the
> `tdep_info' member in `struct gdbarch_info' with an anonymous union,
> comprising the original member, with its type reverted to `struct
> gdbarch_tdep_info *', a `tdesc_data' member of a `struct tdesc_arch_data
> *' type and an `id' member of an `int *' type. Remove now unnecessary
> casts throughout use places then, making code easier to read an less
> prone to errors, which may happen with casting.
>
> gdb/
> * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
> a union of `tdep_info', `tdesc_data' and `id'.
> * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
> rather than `info.tdep_info'.
> * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
> * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
> * i386-tdep.c (i386_gdbarch_init): Likewise.
> * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
> * mips-tdep.c (mips_gdbarch_init): Likewise.
> * nds32-tdep.c (nds32_gdbarch_init): Likewise.
> * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
> * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
> `info.tdep_info'.
> (ppc_linux_init_abi): Use `info.tdesc_data' rather than
> `info.tdep_info'.
> * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
> * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
> `info.tdep_info'.
> * spu-tdep.c (spu_gdbarch_init): Likewise.
> * gdbarch.h: Regenerate.
> ---
> Hi,
>
> Rebased and updated as requested, see the change log below and:
> <https://patchwork.sourceware.org/patch/16622/> for the earlier
> discussion. Verified to build with `--enable-targets=all' and no
> regressions with `mips-linux-gnu' and `x86_64-linux-gnu' targets.
>
> OK to apply?
>
> Maciej
>
> Changes from v1:
>
> - Descriptions for new union members added.
>
> - SPARC backend modification added according to changes made on master
> since the original submission.
Hi Maciej,
This LGTM.
Simon
next prev parent reply other threads:[~2017-08-01 18:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 15:52 Maciej W. Rozycki
2017-08-01 18:34 ` Simon Marchi [this message]
2017-08-07 14:55 ` Maciej W. Rozycki
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=70ac03dc-a681-d54f-bead-00e6829835e1@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=macro@imgtec.com \
--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