From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37830 invoked by alias); 17 May 2016 17:28:11 -0000 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 Received: (qmail 37817 invoked by uid 89); 17 May 2016 17:28:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:sk:047d7b1, H*MI:sk:047d7b1, creat X-HELO: mail-pa0-f73.google.com Received: from mail-pa0-f73.google.com (HELO mail-pa0-f73.google.com) (209.85.220.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 17 May 2016 17:27:53 +0000 Received: by mail-pa0-f73.google.com with SMTP id yr8so1150556pac.0 for ; Tue, 17 May 2016 10:27:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:message-id:date:subject:from:to:cc; bh=qlTcIfZH4s9om5guZKQU9zDJiUvqo6fKkaMkzurXQl8=; b=ZbPVdFT6rXlyZM0nE4i20Swl9+iiKGrZCpSACBEZwUFJLaXktOe7mErfnC8nI+Oorf ILz8/h67gymhKKvPAw4x9DObiaDwoGsJMFee8z54jZyvNzJ8UFQCjYSr7atiii3WATYY bVYkkFXTmlNA6jq7SEGfGJ/Cc15ZEGyy1x2A0EchlqqMcY1vlgei3F4NhPMgYtN6tRJB UStR4Io/NK1n3yx0jP6+xKVthNFGtI/luWK4brFzK/x0jsENvroFUsLT9WzoeOZEOhLC srdPRPfZBSppB9UkqaAsy+pN+Nbit1AsgJJ66wx6EeJsbnReEnrW55I9g9lBtOErbBmQ QkAA== X-Gm-Message-State: AOPr4FUDv+KQ+mNov9khC8+3Jxk/S+20ygyA/22atCHW6sUeSkClJ4ylOsJ0N/+2LO1L/jMUGQ== MIME-Version: 1.0 X-Received: by 10.66.233.5 with SMTP id ts5mr8875065pac.9.1463506071788; Tue, 17 May 2016 10:27:51 -0700 (PDT) Message-ID: <047d7b111fe189726f05330d0fb0@google.com> Date: Tue, 17 May 2016 17:28:00 -0000 Subject: Re: [PATCH v5 4/5] Include group information to xml syscall files. From: Doug Evans To: Gabriel Krisman Bertazi Cc: gdb-patches@sourceware.org, palves@redhat.com, sergiodj@redhat.com Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00268.txt.bz2 Gabriel Krisman Bertazi writes: > We maintain linux-defaults.xml.in, a template file to hold generic group > information. It is used by the XSL script that parses the architecture > specific files to generate the final xml files, which are actually > installed and loaded by GDB. The script is not run during the normal > build process, only when building in maintainer mode. > > gdb/ > > * data-directory/Makefile.in: Generate syscall xml when building > in maintainer mode. > * configure.ac: Include dependency for xsltproc when building > in maintainer-mode. > * syscalls/apply-defaults.xsl: New file. > * syscalls/linux-defaults.xml.in: New file. > * syscalls/aarch64-linux.xml: Rename to aarch64-linux.xml.in. > * syscalls/amd64-linux.xml: Rename to amd64-linux.xml.in. > * syscalls/arm-linux.xml: Rename to arm-linux.xml.in. > * syscalls/bfin-linux.xml: Rename to bfin-linux.xml.in. > * syscalls/i386-linux.xml: Rename to i386-linux.xml.in. > * syscalls/mips-n32-linux.xml: Rename to mips-n32-linux.xml.in. > * syscalls/mips-n64-linux.xml: Rename to mips-n64-linux.xml.in. > * syscalls/mips-o32-linux.xml: Rename to mips-o32-linux.xml.in. > * syscalls/ppc-linux.xml: Rename to ppc-linux.xml.in. > * syscalls/ppc64-linux.xml: Rename to ppc64-linux.xml.in. > * syscalls/s390-linux.xml: Rename to s390-linux.xml.in. > * syscalls/s390x-linux.xml: Rename to s390x-linux.xml.in. > * syscalls/sparc-linux.xml: Rename to sparc-linux.xml.in. > * syscalls/sparc64-linux.xml: Rename to sparc64-linux.xml.in. >... > > diff --git a/gdb/configure.ac b/gdb/configure.ac > index d1930f9..b6529aa 100644 > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -2338,6 +2338,16 @@ if test "${nativefile}" != ""; then > fi > AC_SUBST(GDB_NM_FILE) > > +dnl Add dependency for xsltproc if building with maintainer-mode enabled. > +if test "x$USE_MAINTAINER_MODE" = xyes; then > + AC_PATH_PROGS(XSLTPROC, xsltproc, missing) > + if test "${XSLTPROC}" = missing; then > + AC_ERROR(unable to find xsltproc. maintainer-mode requires xsltproc.) > + fi > +fi > +AC_SUBST(XSLTPROC) I wonder if we document maintainer-mode prerequisites anywhere. > + > + > AC_LINK_FILES($files, $links) > > dnl Check for exe extension set on certain hosts (e.g. Win32) > diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in > index c05f379..9be925a 100644 > --- a/gdb/data-directory/Makefile.in > +++ b/gdb/data-directory/Makefile.in > @@ -22,6 +22,7 @@ PYTHON_SRCDIR = $(srcdir)/../python/lib > GUILE_SRCDIR = $(srcdir)/../guile/lib > SYSTEM_GDBINIT_SRCDIR = $(srcdir)/../system-gdbinit > VPATH = $(srcdir):$(SYSCALLS_SRCDIR):$(PYTHON_SRCDIR):$(GUILE_SRCDIR):$(SYSTEM_GDBINIT_SRCDIR) > +XSLTPROC = @XSLTPROC@ > > top_srcdir = @top_srcdir@ > top_builddir = @top_builddir@ > @@ -162,6 +163,9 @@ FLAGS_TO_PASS = \ > .PHONY: all > all: stamp-syscalls stamp-python stamp-guile stamp-system-gdbinit > > +@MAINTAINER_MODE_TRUE@%.xml: %.xml.in apply-defaults.xsl linux-defaults.xml.in > +@MAINTAINER_MODE_TRUE@ $(XSLTPROC) -o $(SYSCALLS_SRCDIR)/$@ $(SYSCALLS_SRCDIR)/apply-defaults.xsl $<;\ > + > # For portability's sake, we need to handle systems that don't have > # symbolic links. > stamp-syscalls: Makefile $(SYSCALLS_FILES) > diff --git a/gdb/syscalls/aarch64-linux.xml b/gdb/syscalls/aarch64-linux.xml.in > similarity index 100% > rename from gdb/syscalls/aarch64-linux.xml > rename to gdb/syscalls/aarch64-linux.xml.in > diff --git a/gdb/syscalls/amd64-linux.xml b/gdb/syscalls/amd64-linux.xml.in > similarity index 100% > rename from gdb/syscalls/amd64-linux.xml > rename to gdb/syscalls/amd64-linux.xml.in > diff --git a/gdb/syscalls/apply-defaults.xsl b/gdb/syscalls/apply-defaults.xsl > new file mode 100644 > index 0000000..6363fc4 > --- /dev/null > +++ b/gdb/syscalls/apply-defaults.xsl > @@ -0,0 +1,27 @@ > + > + > + + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + At the moment all group information comes from the defaults (I think). I'm assuming all one has to do for special cases is add the group(s) directly to the foo-xml.in file and that will work. Right? IWBN to have some examples so people don't work from a default modus operandi of adding everything to linux-defaults.xml.in. btw, why is linux-defaults.xml.in a ".in" file? I'd expect it to just be linux-defaults.xml. > diff --git a/gdb/syscalls/arm-linux.xml b/gdb/syscalls/arm-linux.xml.in > similarity index 100% > rename from gdb/syscalls/arm-linux.xml > rename to gdb/syscalls/arm-linux.xml.in > diff --git a/gdb/syscalls/bfin-linux.xml b/gdb/syscalls/bfin-linux.xml.in > similarity index 100% > rename from gdb/syscalls/bfin-linux.xml > rename to gdb/syscalls/bfin-linux.xml.in > diff --git a/gdb/syscalls/i386-linux.xml b/gdb/syscalls/i386-linux.xml.in > similarity index 100% > rename from gdb/syscalls/i386-linux.xml > rename to gdb/syscalls/i386-linux.xml.in > diff --git a/gdb/syscalls/linux-defaults.xml.in b/gdb/syscalls/linux-defaults.xml.in > new file mode 100644 > index 0000000..1c4e187 > --- /dev/null > +++ b/gdb/syscalls/linux-defaults.xml.in > @@ -0,0 +1,243 @@ > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > diff --git a/gdb/syscalls/mips-n32-linux.xml b/gdb/syscalls/mips-n32-linux.xml.in > similarity index 100% > rename from gdb/syscalls/mips-n32-linux.xml > rename to gdb/syscalls/mips-n32-linux.xml.in > diff --git a/gdb/syscalls/mips-n64-linux.xml b/gdb/syscalls/mips-n64-linux.xml.in > similarity index 100% > rename from gdb/syscalls/mips-n64-linux.xml > rename to gdb/syscalls/mips-n64-linux.xml.in > diff --git a/gdb/syscalls/mips-o32-linux.xml b/gdb/syscalls/mips-o32-linux.xml.in > similarity index 100% > rename from gdb/syscalls/mips-o32-linux.xml > rename to gdb/syscalls/mips-o32-linux.xml.in > diff --git a/gdb/syscalls/ppc-linux.xml b/gdb/syscalls/ppc-linux.xml.in > similarity index 100% > rename from gdb/syscalls/ppc-linux.xml > rename to gdb/syscalls/ppc-linux.xml.in > diff --git a/gdb/syscalls/ppc64-linux.xml b/gdb/syscalls/ppc64-linux.xml.in > similarity index 100% > rename from gdb/syscalls/ppc64-linux.xml > rename to gdb/syscalls/ppc64-linux.xml.in > diff --git a/gdb/syscalls/s390-linux.xml b/gdb/syscalls/s390-linux.xml.in > similarity index 100% > rename from gdb/syscalls/s390-linux.xml > rename to gdb/syscalls/s390-linux.xml.in > diff --git a/gdb/syscalls/s390x-linux.xml b/gdb/syscalls/s390x-linux.xml.in > similarity index 100% > rename from gdb/syscalls/s390x-linux.xml > rename to gdb/syscalls/s390x-linux.xml.in > diff --git a/gdb/syscalls/sparc-linux.xml b/gdb/syscalls/sparc-linux.xml.in > similarity index 100% > rename from gdb/syscalls/sparc-linux.xml > rename to gdb/syscalls/sparc-linux.xml.in > diff --git a/gdb/syscalls/sparc64-linux.xml b/gdb/syscalls/sparc64-linux.xml.in > similarity index 100% > rename from gdb/syscalls/sparc64-linux.xml > rename to gdb/syscalls/sparc64-linux.xml.in > -- > 2.4.3 >