From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23662 invoked by alias); 30 Aug 2013 09:58:22 -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 23653 invoked by uid 89); 30 Aug 2013 09:58:22 -0000 Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Aug 2013 09:58:22 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.3.2 X-HELO: mga02.intel.com Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 30 Aug 2013 02:58:10 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 30 Aug 2013 02:58:08 -0700 Received: from ulslx001.iul.intel.com (ulslx001.iul.intel.com [172.28.207.63]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id r7U9w8qH014640; Fri, 30 Aug 2013 10:58:08 +0100 Received: from ulslx001.iul.intel.com (localhost [127.0.0.1]) by ulslx001.iul.intel.com with ESMTP id r7U9w7Hp011309; Fri, 30 Aug 2013 11:58:07 +0200 Received: (from wtedesch@localhost) by ulslx001.iul.intel.com with id r7U9w7LR011305; Fri, 30 Aug 2013 11:58:07 +0200 From: Walfred Tedeschi To: gdb-patches@sourceware.org, walfred.tedeschi@intel.com, mircea.gherzan@intel.com Subject: [PATCH v3 0/8] Intel(R) MPX registers. Date: Fri, 30 Aug 2013 09:58:00 -0000 Message-Id: <1377856683-11267-1-git-send-email-walfred.tedeschi@intel.com> X-SW-Source: 2013-08/txt/msg00900.txt.bz2 Hello all, Looking forward for your feedback! Thanks and regards, -Fred This patch series adds support for the Intel(R) Memory Protection Extension MPX registers. Native and remote debugging are covered by this patch. New registers are bound registers known as bnd register (bnd0...bnd3), a configuration register bndcfgu and a status register bndstatus. Bound registers store pointer bounds, i.e. bound limits of a pointer. Bndstatus and bndcfgu store information of the current status and configuration of other MPX counterparts. For more information [1][2]. Design notes: Bound register are represented in hardware as two fields of 64bits each, both in 64bit and 32bit mode. The fields are lower bound and upper bound. Upper bound value is a complement of one value of the upper limiting address. To take this into account the bnd0...bnd3 are created as pseudo registers while the hardware values are stored on bnd0raw...bnd3raw. Ok to commit? References: [1] Intel(R) Architecture Instruction Set Extensions Programming Reference. http://download-software.intel.com/sites/default/files/319433-015.pdf. [2] http://software.intel.com/en-us/intel-isa-extensions. Changes between V1 and V2: * Folowing the Mark Kettenis feedback: Orig_rax and orig_eax are left as the last register on the internal list. * Ported gcc file used for cpuid and corrected overlooked condition to detect MPX hardware while performing MPX related tests. Changes between V2 and V3: * Small changes on changelogs: "Add MPX support for i386" and "Add support for MPX amd64". * Add MPX feature documentation as extra patch. Walfred Tedeschi (8): Fix conditions in creating a bitfield. Add MPX registers XML files. Add MPX support for i386 MPX for amd64 Add MPX support to gdbserver. Add pretty-printer for MPX bnd registers. Add MPX registers tests. Add MPX feature description to GDB manual. gdb/amd64-linux-nat.c | 43 +++-- gdb/amd64-linux-tdep.c | 14 +- gdb/amd64-linux-tdep.h | 6 +- gdb/amd64-tdep.c | 18 +++ gdb/amd64-tdep.h | 8 +- gdb/common/i386-gcc-cpuid.h | 8 +- gdb/common/i386-xstate.h | 21 ++- gdb/data-directory/Makefile.in | 1 + gdb/doc/gdb.texinfo | 17 ++ gdb/features/Makefile | 38 ++++- gdb/features/i386/32bit-mpx.xml | 43 +++++ gdb/features/i386/64bit-mpx.xml | 43 +++++ gdb/features/i386/amd64-mpx-linux.c | 211 ++++++++++++++++++++++++ gdb/features/i386/amd64-mpx-linux.xml | 19 +++ gdb/features/i386/amd64-mpx.c | 206 +++++++++++++++++++++++ gdb/features/i386/amd64-mpx.xml | 17 ++ gdb/features/i386/i386-mpx-linux.c | 187 +++++++++++++++++++++ gdb/features/i386/i386-mpx-linux.xml | 19 +++ gdb/features/i386/i386-mpx.c | 182 +++++++++++++++++++++ gdb/features/i386/i386-mpx.xml | 17 ++ gdb/features/i386/x32-mpx-linux.c | 211 ++++++++++++++++++++++++ gdb/features/i386/x32-mpx-linux.xml | 19 +++ gdb/features/i386/x32-mpx.c | 206 +++++++++++++++++++++++ gdb/features/i386/x32-mpx.xml | 17 ++ gdb/gdbserver/Makefile.in | 15 ++ gdb/gdbserver/configure.srv | 20 +-- gdb/gdbserver/i387-fp.c | 90 +++++++++++ gdb/gdbserver/linux-x86-low.c | 87 ++++++++-- gdb/i386-linux-nat.c | 17 +- gdb/i386-linux-tdep.c | 9 +- gdb/i386-linux-tdep.h | 6 +- gdb/i386-tdep.c | 216 ++++++++++++++++++++++++- gdb/i386-tdep.h | 30 +++- gdb/i387-tdep.c | 130 ++++++++++++++- gdb/i387-tdep.h | 7 + gdb/python/lib/gdb/command/bound_registers.py | 45 ++++++ gdb/regformats/i386/amd64-mpx-linux.dat | 84 ++++++++++ gdb/regformats/i386/amd64-mpx.dat | 83 ++++++++++ gdb/regformats/i386/i386-mpx-linux.dat | 60 +++++++ gdb/regformats/i386/i386-mpx.dat | 59 +++++++ gdb/regformats/i386/x32-mpx-linux.dat | 84 ++++++++++ gdb/regformats/i386/x32-mpx.dat | 83 ++++++++++ gdb/target-descriptions.c | 2 +- gdb/testsuite/gdb.arch/i386-mpx.c | 92 +++++++++++ gdb/testsuite/gdb.arch/i386-mpx.exp | 142 ++++++++++++++++ gdb/testsuite/gdb.python/py-pp-maint.exp | 8 +- gdb/testsuite/gdb.xml/maint_print_struct.xml | 1 + 47 files changed, 2868 insertions(+), 73 deletions(-) create mode 100644 gdb/features/i386/32bit-mpx.xml create mode 100644 gdb/features/i386/64bit-mpx.xml create mode 100644 gdb/features/i386/amd64-mpx-linux.c create mode 100644 gdb/features/i386/amd64-mpx-linux.xml create mode 100644 gdb/features/i386/amd64-mpx.c create mode 100644 gdb/features/i386/amd64-mpx.xml create mode 100644 gdb/features/i386/i386-mpx-linux.c create mode 100644 gdb/features/i386/i386-mpx-linux.xml create mode 100644 gdb/features/i386/i386-mpx.c create mode 100644 gdb/features/i386/i386-mpx.xml create mode 100644 gdb/features/i386/x32-mpx-linux.c create mode 100644 gdb/features/i386/x32-mpx-linux.xml create mode 100644 gdb/features/i386/x32-mpx.c create mode 100644 gdb/features/i386/x32-mpx.xml create mode 100644 gdb/python/lib/gdb/command/bound_registers.py create mode 100644 gdb/regformats/i386/amd64-mpx-linux.dat create mode 100644 gdb/regformats/i386/amd64-mpx.dat create mode 100644 gdb/regformats/i386/i386-mpx-linux.dat create mode 100644 gdb/regformats/i386/i386-mpx.dat create mode 100644 gdb/regformats/i386/x32-mpx-linux.dat create mode 100644 gdb/regformats/i386/x32-mpx.dat create mode 100644 gdb/testsuite/gdb.arch/i386-mpx.c create mode 100644 gdb/testsuite/gdb.arch/i386-mpx.exp -- 1.7.10.4