From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3026 invoked by alias); 10 Jun 2015 12:46:03 -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 3017 invoked by uid 89); 10 Jun 2015 12:46:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mga14.intel.com Received: from mga14.intel.com (HELO mga14.intel.com) (192.55.52.115) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Jun 2015 12:46:01 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 10 Jun 2015 05:43:25 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2015 05:43:23 -0700 Received: from ulvlx001.iul.intel.com (ulvlx001.iul.intel.com [172.28.207.17]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t5AChMiJ029397; Wed, 10 Jun 2015 13:43:22 +0100 Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id t5AChMir023014; Wed, 10 Jun 2015 14:43:22 +0200 Received: (from wtedesch@localhost) by ulvlx001.iul.intel.com with œ id t5AChM7c023010; Wed, 10 Jun 2015 14:43:22 +0200 From: Walfred Tedeschi To: brobecker@adacore.com, eliz@gnu.org Cc: gdb-patches@sourceware.org, Walfred Tedeschi Subject: [PATCH 1/1] Fix broken GDB build after adding Bound table support for i386. Date: Wed, 10 Jun 2015 12:46:00 -0000 Message-Id: <1433940196-22975-1-git-send-email-walfred.tedeschi@intel.com> X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00178.txt.bz2 Types used for some variables could not be used for 32 bits. This patch changes uses larger types to accommodate the biggest integer possible. Documentation was also affected, once a different version of texinfo the docs could not be build. 2015-06-10 Walfred Tedeschi * i386-tdep.c (i386_mpx_get_bt_entry): Exchange CORE_ADDR by ULONGEST. doc: gdb.textinfo (i386): Fix "@end table" end and "@table" placement. --- gdb/doc/gdb.texinfo | 2 ++ gdb/i386-tdep.c | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 9e9138b..8b4cb88 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -22127,6 +22127,7 @@ be returned in a register. @kindex show struct-convention Show the current setting of the convention to return @code{struct}s from functions. +@end table @subsubsection Intel(R) @dfn{Memory Protection Extensions} (MPX). @@ -22168,6 +22169,7 @@ the bounds pointer's value along with its bounds. Evaluating and changing bounds located in bound tables is therefore interesting while investigating bugs on MPX context. @value{GDBN} provides commands for this purpose: +@table @code @item show mpx bound @var{pointer} @kindex show mpx bound Display bounds of the given @var{pointer}. diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 6304591..7de9792 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -8665,13 +8665,13 @@ i386_mpx_enabled (void) static CORE_ADDR i386_mpx_get_bt_entry (CORE_ADDR ptr, CORE_ADDR bd_base) { - CORE_ADDR offset1; - CORE_ADDR offset2; - CORE_ADDR mpx_bd_mask, bd_ptr_r_shift, bd_ptr_l_shift; - CORE_ADDR bt_mask, bt_select_r_shift, bt_select_l_shift; - CORE_ADDR bd_entry_addr; - CORE_ADDR bt_addr; - CORE_ADDR bd_entry; + ULONGEST offset1; + ULONGEST offset2; + ULONGEST mpx_bd_mask, bd_ptr_r_shift, bd_ptr_l_shift; + ULONGEST bt_mask, bt_select_r_shift, bt_select_l_shift; + ULONGEST bd_entry_addr; + ULONGEST bt_addr; + ULONGEST bd_entry; struct gdbarch *gdbarch = get_current_arch (); struct type *data_ptr_type = builtin_type (gdbarch)->builtin_data_ptr; -- 2.1.4