Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: "Maciej W. Rozycki" <macro@imgtec.com>
Cc: gdb-patches@sourceware.org, Simon Marchi <simon.marchi@ericsson.com>
Subject: Re: [PATCH] gdbarch: Use an anonymous union for target data in  `gdbarch_info'
Date: Tue, 08 Nov 2016 21:43:00 -0000	[thread overview]
Message-ID: <68783b4bebb59fa288d261a8f217cf82@polymtl.ca> (raw)
In-Reply-To: <alpine.DEB.2.00.1610181615410.31859@tp.orcam.me.uk>

On 2016-10-18 12:19, 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.

I glanced quickly at your patch, and I think it looks good.  As Yao 
said, some comments would be nice, because just like that it's hard to 
understand why those fields are grouped together in an union, as they 
seem unrelated to each other.


      parent reply	other threads:[~2016-11-08 21:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 16:20 Maciej W. Rozycki
2016-11-08  8:47 ` Maciej W. Rozycki
2016-11-08 21:20 ` Yao Qi
2016-11-08 21:43 ` 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=68783b4bebb59fa288d261a8f217cf82@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=macro@imgtec.com \
    --cc=simon.marchi@ericsson.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