From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24233 invoked by alias); 2 Feb 2007 18:53:42 -0000 Received: (qmail 24223 invoked by uid 22791); 2 Feb 2007 18:53:41 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (213.8.233.22) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 02 Feb 2007 18:53:33 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-250-236.inter.net.il [80.230.250.236]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id FYP39769 (AUTH halo1); Fri, 2 Feb 2007 20:53:25 +0200 (IST) Date: Fri, 02 Feb 2007 18:53:00 -0000 Message-Id: From: Eli Zaretskii To: Daniel Jacobowitz CC: gdb-patches@sourceware.org In-reply-to: <20070129213229.GA17422@nevyn.them.org> (message from Daniel Jacobowitz on Mon, 29 Jan 2007 16:32:30 -0500) Subject: Re: XML XInclude support Reply-to: Eli Zaretskii References: <20070129213229.GA17422@nevyn.them.org> 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: 2007-02/txt/msg00021.txt.bz2 > Date: Mon, 29 Jan 2007 16:32:30 -0500 > From: Daniel Jacobowitz > Cc: Eli Zaretskii > > This patch adds support for a limited subset (I confess, very limited) > of XInclude to GDB's target description parser. It's a simple textual > transform. A file that looks like this: > > > > > > is expanded to include the contents of other.xml instead of the > xi:include element, before parsing it as a target description. > For "set tdesc filename" other.xml should be in the same directory > as the original description. For qXfer:features, other.xml is > a new annex to read from the target. Thanks. > + /* Simple, portable version of dirname that does not modify its > + argument. */ > + base = lbasename (filename); > + while (base > filename && IS_DIR_SEPARATOR (base[-1])) > + --base; I'm glad to see portable file-name handling, but this loop needs a small extra to not fail in the case of "d:foo". > +@example > + > +@end example > + > +@noindent > +When @value{GDBN} encounters an element of this form, it will retrieve > +the XML document named @var{name}, and replace the inclusion directive > +with the contents of that annex. I'd suggest to use @var{document} instead of @var{name}, and reword the last sentence like this: When @value{GDBN} encounters an element of this form, it will retrieve the named XML @var{document} ... > If the current description was read > +using @samp{qXfer}, then the new document will be also This "the new document will be also" is a bit confusing, I think. How about this instead: If the current description was read using @samp{qXfer}, then so will be the included @var{document}; the description's name will be interpreted as the name of an annex. > If the current description was read from a > +file, @value{GDBN} will look for a file named @var{name} in the same > +directory as the original file. If the current description was read from a file, @value{GDBN} will look for @var{document} as a file in the same directory where it found the original description.