From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6511 invoked by alias); 9 Jun 2015 16:26: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 6502 invoked by uid 89); 9 Jun 2015 16:26:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 09 Jun 2015 16:26:10 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 18C7C28972; Tue, 9 Jun 2015 12:26:08 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JGDXA2gRWSWv; Tue, 9 Jun 2015 12:26:08 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E8BB128876; Tue, 9 Jun 2015 12:26:07 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 671E34067C; Tue, 9 Jun 2015 12:26:07 -0400 (EDT) Date: Tue, 09 Jun 2015 16:26:00 -0000 From: Joel Brobecker To: Walfred Tedeschi Cc: eliz@gnu.org, gdb-patches@sourceware.org Subject: Re: [PATCH V4] Add support for bound table in the Intel MPX context. Message-ID: <20150609162607.GA2855@adacore.com> References: <1433856847-16851-1-git-send-email-walfred.tedeschi@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433856847-16851-1-git-send-email-walfred.tedeschi@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-06/txt/msg00136.txt.bz2 > 2015-04-20 Walfred Tedeschi > Mircea Gherzan > > * i386-tdep.c (MPX_BASE_MASK, MPX_BD_MASK, MPX_BT_MASK, MPX_BD_MASK_32, > MPX_BT_MASK_32): New macros. > (i386_mpx_set_bounds): New function that implements > the command "set-mpx-bound". > (i386_mpx_enabled) Helper function to test MPX availability. > (i386_mpx_bd_base) Helper function to calculate the base directory > address. (i386_mpx_get_bt_entry) Helper function to access a bound > table entry. (i386_mpx_print_bounds) Effectively display bound > information. (_initialize_i386_tdep): Qdd new commands > to commands "set mpx" and "show mpx". (_initialize_i386_tdep): > Add "bound" to the commands "show mpx" and "set mpx" commands. > (mpx_set_cmdlist and mpx_show_cmdlist): > list for the new prefixed "set mpx" and "show mpx" commands. > * NEWS: List new commands for MPX support. > > testsuite: > > * gdb.arch/i386-mpx-map.c: New file. > * gdb.arch/i386-mpx-map.exp: New File. > > doc: > * gdb.texinfo (i386): Add documentation about "show mpx bound" > and "set mpx bound". > +/* Print routine for the mpx bounds. */ > + > +static void > +i386_mpx_print_bounds (const CORE_ADDR bt_entry[]) I don't think we've been using the [] syntax for parameters, but I don't see a problem with that per se. What I'm wondering, however, is the size of the array. In particular, you'll need, at least, to update the documentation. But if the size is actually statically known (which it seems is at most 4 elements), then perhaps it might be worth just saying it in the parameter type declaration... Other than that, the patch looks good to me. -- Joel