From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2786 invoked by alias); 29 Feb 2008 13:48:49 -0000 Received: (qmail 2710 invoked by uid 22791); 29 Feb 2008 13:48:48 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 29 Feb 2008 13:48:27 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 6CA59983A3; Fri, 29 Feb 2008 13:48:25 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 33AFE983A2; Fri, 29 Feb 2008 13:48:22 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JV5b4-0000so-3o; Fri, 29 Feb 2008 08:48:22 -0500 Date: Fri, 29 Feb 2008 17:23:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Make version attribute of really optional Message-ID: <20080229134822.GA2903@caradoc.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sourceware.org References: <20080229035744.GK19729@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080229035744.GK19729@adacore.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00495.txt.bz2 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 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