old-cross-binutils/gdb/testsuite
Walfred Tedeschi f92b06daf9 Fix display of structures/bitfields in register description.
Add support for displaying structures and bitfields for registers when
executing "maint print c-tdesc". This command is also used when
converting the xml target description file into c file.

Example of the behaviour is given below reporting a snipet of the xml file
and a snippet of the c code generated.

XML file contains:
...
    <union id="vecint">
      <field name="v4" type="v4int8"/>
      <field name="v2" type="v2int16"/>
    </union>

    <struct id="struct1">
      <field name="v4" type="v4int8"/>
      <field name="v2" type="v2int16"/>
    </struct>

    <struct id="struct2" size="8">
      <field name="f1" start="0" end="34"/>
      <field name="f2" start="63" end="63"/>
    </struct>
...

Setting this xml file as target description file and
issuing the maintenance print c-tdesc the following output
is obtained:

  feature = tdesc_create_feature (result, "extra");
  field_type = tdesc_named_type (feature, "int8");
  tdesc_create_vector (feature, "v4int8", field_type, 4);

  field_type = tdesc_named_type (feature, "int16");
  tdesc_create_vector (feature, "v2int16", field_type, 2);

  type = tdesc_create_union (feature, "vecint");
  field_type = tdesc_named_type (feature, "v4int8");
  tdesc_add_field (type, "v4", field_type);
  field_type = tdesc_named_type (feature, "v2int16");
  tdesc_add_field (type, "v2", field_type);

C output is not supported type "struct1".

This is finally the issue.

2013-03-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>

        * target-descriptions.c (maint_print_c_tdesc_cmd):
        Add case to parse structures as register types and
        bitfields.

testsuite/

	* gdb.xml/maint_print_struct.exp: New file.
	* gdb.xml/maint_print_struct.xml: New file.

Change-Id: I2e20b095d508319c80275e724a9452c7e2834067
Signed-off-by: Walfred Tedeschi <walfred.tedeschi@intel.com>
2013-04-30 12:33:52 +00:00
..
boards
config gdb/testsuite/ 2013-03-14 13:34:06 +00:00
gdb.ada Ignore __fu<digits>__ symbols from COFF symbol tables 2013-03-29 02:04:15 +00:00
gdb.arch 2013-04-22 Sergio Durigan Junior <sergiodj@redhat.com> 2013-04-22 09:32:21 +00:00
gdb.asm
gdb.base 2013-04-24 Muhammad Bilal <mbilal@codesourcery.com> 2013-04-24 14:29:17 +00:00
gdb.btrace record-btrace: fix assertion when enabling recording after re-run 2013-03-26 07:15:09 +00:00
gdb.cell
gdb.cp PR c++/13588: 2013-04-15 18:13:01 +00:00
gdb.disasm
gdb.dwarf2 PR corefiles/14983: 2013-04-25 16:25:37 +00:00
gdb.fortran
gdb.gdb * gdb.gdb/selftest.exp (do_steps_and_nexts): Check for 2013-04-22 20:18:23 +00:00
gdb.go
gdb.hp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
gdb.java
gdb.linespec 2013-04-04 Sandra Loosemore <sandra@codesourcery.com> 2013-04-04 20:59:12 +00:00
gdb.mi * gdb.mi/mi-var-create-rtti.exp: Create a variable of 2013-04-18 10:08:08 +00:00
gdb.modula2
gdb.multi
gdb.objc
gdb.opencl
gdb.opt
gdb.pascal
gdb.python gdb/testsuite/ 2013-03-14 13:34:06 +00:00
gdb.reverse
gdb.server gdb/testsuite/ 2013-04-09 15:26:44 +00:00
gdb.stabs
gdb.threads gdb/testsuite/ 2013-03-15 01:41:29 +00:00
gdb.trace Accept "set foo unlimited" in integer/uinteger/zuinteger_unlimited commands. 2013-04-10 15:11:12 +00:00
gdb.xml Fix display of structures/bitfields in register description. 2013-04-30 12:33:52 +00:00
lib * lib/dwarf.exp (Dwarf): New proc "tu". 2013-04-17 21:07:09 +00:00
aclocal.m4
ChangeLog Fix display of structures/bitfields in register description. 2013-04-30 12:33:52 +00:00
configure Add tests for the new record-btrace target. 2013-03-11 08:59:00 +00:00
configure.ac Add tests for the new record-btrace target. 2013-03-11 08:59:00 +00:00
dg-extract-results.sh
Makefile.in Add tests for the new record-btrace target. 2013-03-11 08:59:00 +00:00
TODO