[review] Propagate endianity to subrange types
Tom Tromey (Code Review)
gerrit@gnutoolchain-gerrit.osci.io
Wed Nov 27 18:48:00 GMT 2019
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/730
......................................................................
Propagate endianity to subrange types
A subrange type should inherit its endianity from its base type.
gdb/ChangeLog
2019-11-27 Tom Tromey <tromey@adacore.com>
* gdbtypes.c (create_range_type): Inherit endianity
from base type.
Change-Id: I2998ab919dc28aeff097763c4242f9bfb90823a3
---
M gdb/ChangeLog
M gdb/gdbtypes.c
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 58f7f46..590ad25 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2019-11-27 Tom Tromey <tromey@adacore.com>
+ * gdbtypes.c (create_range_type): Inherit endianity
+ from base type.
+
+2019-11-27 Tom Tromey <tromey@adacore.com>
+
* ada-lang.c (decode_constrained_packed_array)
(ada_value_assign, value_assign_to_component): Update.
* dwarf2loc.c (rw_pieced_value, access_memory)
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 31bfa47..c4e49ef 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -945,6 +945,9 @@
if (high_bound->kind == PROP_CONST && high_bound->data.const_val < 0)
TYPE_UNSIGNED (result_type) = 0;
+ TYPE_ENDIANITY_NOT_DEFAULT (result_type)
+ = TYPE_ENDIANITY_NOT_DEFAULT (index_type);
+
return result_type;
}
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I2998ab919dc28aeff097763c4242f9bfb90823a3
Gerrit-Change-Number: 730
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newchange
More information about the Gdb-patches
mailing list