mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-30 13:33:53 +08:00
Fix conditions in creating a bitfield.
Bitfields are represented by intervals [start, begin]. It means that for an interval comprised by only one bit start and end will be equal. The present condition does not always hold. On the other hand in target-description.c (tdesc_gdb_type) bitfield is created when "f->type" is null. The routine maint_print_maint_print_c_tdesc_cmd is modified to follow the same strategy. 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com> * target-descriptions.c (maint_print_maint_print_c_tdesc_cmd): Modified logic of creating a bitfield to be in sync with tdesc_gdb_type. testsuite/ * gdb.xml/maint_print_struct.xml (bitfield): Added bitfield having start and end equal 0. Change-Id: I8c62db049995f0c0c30606d9696b86afe237cbb9
This commit is contained in:
parent
87b8eed7fb
commit
57803a3c60
@ -1,3 +1,9 @@
|
||||
2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
|
||||
|
||||
* target-descriptions.c (maint_print_maint_print_c_tdesc_cmd):
|
||||
Modified logic of creating a bitfield to be in sync with
|
||||
tdesc_gdb_type.
|
||||
|
||||
2013-11-20 Will Newton <will.newton@linaro.org>
|
||||
|
||||
* arm-tdep.c (arm_get_next_pc): Remove "Infinite loop detected"
|
||||
|
@ -1762,7 +1762,7 @@ feature = tdesc_create_feature (result, \"%s\");\n",
|
||||
/* Going first for implicitly sized types, else part handles
|
||||
bitfields. As reported on xml-tdesc.c implicitly sized types
|
||||
cannot contain a bitfield. */
|
||||
if (f->start == 0 && f->end == 0)
|
||||
if (f->type != NULL)
|
||||
{
|
||||
printf_unfiltered
|
||||
(" field_type = tdesc_named_type (feature, \"%s\");\n",
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
|
||||
|
||||
* gdb.xml/maint_print_struct.xml (bitfield): Added bitfield having
|
||||
start and end equal 0.
|
||||
|
||||
2013-11-19 Yao Qi <yao@codesourcery.com>
|
||||
|
||||
* lib/mi-support.exp (mi_child_regexp): Remove 'whatever'.
|
||||
|
@ -15,6 +15,7 @@
|
||||
</struct>
|
||||
|
||||
<struct id="bitfield" size="8">
|
||||
<field name="field0" start="0" end="0"/>
|
||||
<field name="field1" start="24" end="63"/>
|
||||
<field name="field2" start="16" end="24"/>
|
||||
</struct>
|
||||
|
Loading…
Reference in New Issue
Block a user