From: "Simon Marchi (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: Tom Tromey <tromey@sourceware.org>, gdb-patches@sourceware.org
Subject: [review] Remove gdbarch_bits_big_endian
Date: Wed, 27 Nov 2019 22:09:00 -0000 [thread overview]
Message-ID: <20191127220858.5DACF20AF6@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1574880479000.I379b5e0c408ec8742f7a6c6b721108e73ed1b018@gnutoolchain-gerrit.osci.io>
Simon Marchi has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/729
......................................................................
Patch Set 1:
(2 comments)
| --- gdb/dwarf2loc.c
| +++ gdb/dwarf2loc.c
| @@ -1573,18 +1573,17 @@ rw_pieced_value (struct value *v, struct value *from)
| LONGEST offset = 0, max_offset;
| ULONGEST bits_to_skip;
| gdb_byte *v_contents;
| const gdb_byte *from_contents;
| struct piece_closure *c
| = (struct piece_closure *) value_computed_closure (v);
| gdb::byte_vector buffer;
| - int bits_big_endian
| - = gdbarch_bits_big_endian (get_type_arch (value_type (v)));
| + int bits_big_endian = type_byte_order (value_type (v)) == BFD_ENDIAN_BIG;
PS1, Line 1580:
It could be a good opportunity to change all these int to bool, in the
lines that you touched.
|
| if (from != NULL)
| {
| from_contents = value_contents (from);
| v_contents = NULL;
| }
| else
| {
| if (value_type (v) != value_enclosing_type (v))
| --- gdb/gdbtypes.h
| +++ gdb/gdbtypes.h
| @@ -545,16 +545,15 @@ };
|
| union type_owner
| {
| struct objfile *objfile;
| struct gdbarch *gdbarch;
| };
|
| union field_location
| {
| /* * Position of this field, counting in bits from start of
PS1, Line 554:
Could you remove this extra asterisk while at it?
| - containing structure. For gdbarch_bits_big_endian=1
| - targets, it is the bit offset to the MSB. For
| - gdbarch_bits_big_endian=0 targets, it is the bit offset to
| - the LSB. */
| + containing structure. For big-endian targets, it is the bit
| + offset to the MSB. For little-endian targets, it is the bit
| + offset to the LSB. */
|
| LONGEST bitpos;
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I379b5e0c408ec8742f7a6c6b721108e73ed1b018
Gerrit-Change-Number: 729
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Comment-Date: Wed, 27 Nov 2019 22:08:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
next prev parent reply other threads:[~2019-11-27 22:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-27 18:56 Tom Tromey (Code Review)
2019-11-27 22:09 ` Simon Marchi (Code Review) [this message]
2019-12-03 21:32 ` Tom Tromey (Code Review)
2019-12-04 14:36 ` [review v2] " Tom Tromey (Code Review)
2019-12-04 15:35 ` Simon Marchi (Code Review)
2019-12-04 16:41 ` [pushed] " Sourceware to Gerrit sync (Code Review)
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=20191127220858.5DACF20AF6@gnutoolchain-gerrit.osci.io \
--to=gerrit@gnutoolchain-gerrit.osci.io \
--cc=gdb-patches@sourceware.org \
--cc=gnutoolchain-gerrit@osci.io \
--cc=tromey@sourceware.org \
/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