57803a3c60
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
27 lines
807 B
XML
27 lines
807 B
XML
<?xml version="1.0"?>
|
|
<!-- Copyright (C) 2010-2013 Free Software Foundation, Inc.
|
|
|
|
Copying and distribution of this file, with or without modification,
|
|
are permitted in any medium without royalty provided the copyright
|
|
notice and this notice are preserved. -->
|
|
|
|
<!DOCTYPE feature SYSTEM "gdb-target.dtd">
|
|
<target>
|
|
<feature name="test">
|
|
|
|
<struct id="two_fielded">
|
|
<field name="field1" type="data_ptr"/>
|
|
<field name="field2" type="data_ptr"/>
|
|
</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>
|
|
|
|
<reg name="bad_reg1" bitsize="128" type="two_fielded"/>
|
|
<reg name="bad_reg2" bitsize="64" type="bitfield"/>
|
|
</feature>
|
|
</target>
|
|
|