From patchwork Sun May 15 20:31:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Krisman Bertazi X-Patchwork-Id: 12272 Received: (qmail 24833 invoked by alias); 15 May 2016 20:32:49 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 24741 invoked by uid 89); 15 May 2016 20:32:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 spammy=similarity, wwww3org, UD:www.w3.org, xmlns X-HELO: layla.krisman.be Received: from layla.krisman.be (HELO layla.krisman.be) (176.31.208.35) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 15 May 2016 20:32:33 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (envelope-from ) id 1b22HZ-0002iG-Q8; Sun, 15 May 2016 22:04:58 +0200 From: Gabriel Krisman Bertazi To: gdb-patches@sourceware.org Cc: palves@redhat.com, sergiodj@redhat.com, dje@google.com, Gabriel Krisman Bertazi Subject: [PATCH v5 4/5] Include group information to xml syscall files. Date: Sun, 15 May 2016 17:31:59 -0300 Message-Id: <1463344320-6439-5-git-send-email-gabriel@krisman.be> In-Reply-To: <1463344320-6439-1-git-send-email-gabriel@krisman.be> References: <1463344320-6439-1-git-send-email-gabriel@krisman.be> X-IsSubscribed: yes 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. --- gdb/configure.ac | 10 + gdb/data-directory/Makefile.in | 4 + .../{aarch64-linux.xml => aarch64-linux.xml.in} | 0 .../{amd64-linux.xml => amd64-linux.xml.in} | 0 gdb/syscalls/apply-defaults.xsl | 27 +++ gdb/syscalls/{arm-linux.xml => arm-linux.xml.in} | 0 gdb/syscalls/{bfin-linux.xml => bfin-linux.xml.in} | 0 gdb/syscalls/{i386-linux.xml => i386-linux.xml.in} | 0 gdb/syscalls/linux-defaults.xml.in | 243 +++++++++++++++++++++ .../{mips-n32-linux.xml => mips-n32-linux.xml.in} | 0 .../{mips-n64-linux.xml => mips-n64-linux.xml.in} | 0 .../{mips-o32-linux.xml => mips-o32-linux.xml.in} | 0 gdb/syscalls/{ppc-linux.xml => ppc-linux.xml.in} | 0 .../{ppc64-linux.xml => ppc64-linux.xml.in} | 0 gdb/syscalls/{s390-linux.xml => s390-linux.xml.in} | 0 .../{s390x-linux.xml => s390x-linux.xml.in} | 0 .../{sparc-linux.xml => sparc-linux.xml.in} | 0 .../{sparc64-linux.xml => sparc64-linux.xml.in} | 0 18 files changed, 284 insertions(+) rename gdb/syscalls/{aarch64-linux.xml => aarch64-linux.xml.in} (100%) rename gdb/syscalls/{amd64-linux.xml => amd64-linux.xml.in} (100%) create mode 100644 gdb/syscalls/apply-defaults.xsl rename gdb/syscalls/{arm-linux.xml => arm-linux.xml.in} (100%) rename gdb/syscalls/{bfin-linux.xml => bfin-linux.xml.in} (100%) rename gdb/syscalls/{i386-linux.xml => i386-linux.xml.in} (100%) create mode 100644 gdb/syscalls/linux-defaults.xml.in rename gdb/syscalls/{mips-n32-linux.xml => mips-n32-linux.xml.in} (100%) rename gdb/syscalls/{mips-n64-linux.xml => mips-n64-linux.xml.in} (100%) rename gdb/syscalls/{mips-o32-linux.xml => mips-o32-linux.xml.in} (100%) rename gdb/syscalls/{ppc-linux.xml => ppc-linux.xml.in} (100%) rename gdb/syscalls/{ppc64-linux.xml => ppc64-linux.xml.in} (100%) rename gdb/syscalls/{s390-linux.xml => s390-linux.xml.in} (100%) rename gdb/syscalls/{s390x-linux.xml => s390x-linux.xml.in} (100%) rename gdb/syscalls/{sparc-linux.xml => sparc-linux.xml.in} (100%) rename gdb/syscalls/{sparc64-linux.xml => sparc64-linux.xml.in} (100%) 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) + + 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 @@ + + + + + + + + + + + + + + + + + + + + + + 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