This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Make version attribute of <target> really optional


On Thu, Feb 28, 2008 at 07:57:44PM -0800, Joel Brobecker wrote:
> Hello,
> 
> I'm trying to fix the type of the "lr" register in the XML features
> files for rs6000, but I have hit a strange problem: The XML parser
> is complaining that the version number in the <target> element is
> missing. On the other hand, the documentation says that it is
> optional (but recommended).
> 
> Looking back at the discussion, it seems that the attribute was
> meant to be optional for now. But on the other hand, the implementation
> was such that the attribute is NOT optional.

The DTD says:

version         CDATA   #FIXED "1.0"

What's supposed to happen is that expat fills in this value when you
parse the document.  It will complain if version is set to something
besides 1.0, but add version="1.0" if it was not specified.

It looks to me like something is wrong with your expat, or we are
depending on a configuration knob of expat that you've got turned the
other way and we should improve the configure test, or else we are
using expat in a way that broke with 2.0.1 (I usually use 1.95.8 since
that's what Debian has).

> I thought it'd quickly give it a go at making the attribute optional,
> and the following seems to be working, but now I'm having other issues
> when trying to read the XML file from GDB:
> 
>     (gdb) set tdesc filename rs6000/powerpc-32.xml 
>     warning: while parsing target description: unbound prefix
>     warning: Could not load XML target description; ignoring

Ditto.  When this error occurs, which parser is running?  There's two,
one for the gdb-target.dtd and one preprocessor for xi:include.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]