Commit 54e75f29 authored by Andrew Burgess's avatar Andrew Burgess
Browse files

gdbsupport/tdesc: print enum fields using 'evalue' syntax

Currently when printing an XML description GDB prints enum values like
this:

  <enum id="levels_type" size="4">
    <field name="low" start="0"/>
    <field name="high" start="1"/>
  </enum>

This is incorrect, and is most likely a copy and paste error with the
struct and flags printing code.  The correct syntax is:

  <enum id="levels_type" size="4">
    <evalue name="low" value="0"/>
    <evalue name="high" value="1"/>
  </enum>

A test is included to cover this functionality.

gdb/testsuite/ChangeLog:

	* gdb.xml/maint-xml-dump-03.xml: New file.

gdbsupport/ChangeLog:

	* tdesc.cc (print_xml_feature::visit): Print enum fields using
	'evalue' syntax.
parent 4f36e61b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment