From: "Tedeschi, Walfred" <walfred.tedeschi@intel.com>
To: "Tedeschi, Walfred" <walfred.tedeschi@intel.com>,
Joel Brobecker <brobecker@adacore.com>
Cc: "eliz@gnu.org" <eliz@gnu.org>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH 1/1] Fix broken GDB build after adding Bound table support for i386.
Date: Thu, 11 Jun 2015 09:53:00 -0000 [thread overview]
Message-ID: <AC542571535E904D8E8ADAE745D60B194442976E@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <AC542571535E904D8E8ADAE745D60B19444202A2@IRSMSX102.ger.corp.intel.com>
Joel,
I am considering using a guard on the code like bellow:
if (gdbarch_ptr_bit (gdbarch) == 64)
{
#ifdef __x86_64__
mpx_bd_mask = MPX_BD_MASK; <- Here. MPX_BD_MASK is #define MPX_BD_MASK 0xfffffff00000ULL /* select bits [47:20] */
bd_ptr_r_shift = 20;
bd_ptr_l_shift = 3;
bt_select_r_shift = 3;
bt_select_l_shift = 5;
bt_mask = MPX_BT_MASK;
#else
error(_("operation not supported yet")
#endif
}
else
{
I consider that debugging a 64 bit application with a 32 bit debugger is not supported fully, but I might be wrong.
In any case would this be an acceptable solution?
Thanks a lot and best regards,
-Fred
-----Original Message-----
From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Tedeschi, Walfred
Sent: Wednesday, June 10, 2015 4:56 PM
To: Joel Brobecker
Cc: eliz@gnu.org; gdb-patches@sourceware.org
Subject: RE: [PATCH 1/1] Fix broken GDB build after adding Bound table support for i386.
Joel,
The message is this one:
----
/users/wtedesch/external/binutils-gdb/gdb/i386-tdep.c: In function 'i386_mpx_get_bt_entry':
/users/wtedesch/external/binutils-gdb/gdb/i386-tdep.c:8681:7: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
----
Here is the reason:
-----
if (gdbarch_ptr_bit (gdbarch) == 64)
{
mpx_bd_mask = MPX_BD_MASK; <- Here. MPX_BD_MASK is #define MPX_BD_MASK 0xfffffff00000ULL /* select bits [47:20] */
bd_ptr_r_shift = 20;
bd_ptr_l_shift = 3;
bt_select_r_shift = 3;
bt_select_l_shift = 5;
bt_mask = MPX_BT_MASK;
}
else
{
mpx_bd_mask = MPX_BD_MASK_32;
bd_ptr_r_shift = 12;
bd_ptr_l_shift = 2;
bt_select_r_shift = 2;
bt_select_l_shift = 4;
bt_mask = MPX_BT_MASK_32;
}
----
Thanks and regards,
-Fred
-----Original Message-----
From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Joel Brobecker
Sent: Wednesday, June 10, 2015 4:13 PM
To: Tedeschi, Walfred
Cc: eliz@gnu.org; gdb-patches@sourceware.org
Subject: Re: [PATCH 1/1] Fix broken GDB build after adding Bound table support for i386.
> 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 <walfred.tedeschi@intel.com>
>
> * i386-tdep.c (i386_mpx_get_bt_entry): Exchange CORE_ADDR by
> ULONGEST.
>
> doc:
> gdb.textinfo (i386): Fix "@end table" end and "@table" placement.
Can you post the error messages, so we can understand why this is necessary? I'm also wondering whether you really want to return a CORE_ADDR which is the sum of 2 ULONGEST now...
--
Joel
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
next prev parent reply other threads:[~2015-06-11 9:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-10 12:46 Walfred Tedeschi
2015-06-10 12:51 ` Tedeschi, Walfred
2015-06-10 14:13 ` Joel Brobecker
2015-06-10 14:56 ` Tedeschi, Walfred
2015-06-11 9:53 ` Tedeschi, Walfred [this message]
2015-06-11 16:18 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AC542571535E904D8E8ADAE745D60B194442976E@IRSMSX104.ger.corp.intel.com \
--to=walfred.tedeschi@intel.com \
--cc=brobecker@adacore.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox