From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30741 invoked by alias); 11 May 2012 20:25:22 -0000 Received: (qmail 30727 invoked by uid 22791); 11 May 2012 20:25:21 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 May 2012 20:25:05 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q4BKP2mU016583; Fri, 11 May 2012 22:25:02 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q4BKP0fa012403; Fri, 11 May 2012 22:25:00 +0200 (CEST) Date: Fri, 11 May 2012 20:25:00 -0000 Message-Id: <201205112025.q4BKP0fa012403@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: hjl.tools@gmail.com CC: gdb-patches@sourceware.org In-reply-to: <20120511193114.GA5097@intel.com> (hongjiu.lu@intel.com) Subject: Re: PATCH: Check DS segment register for x32 process References: <20120511193114.GA5097@intel.com> 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 X-SW-Source: 2012-05/txt/msg00447.txt.bz2 > Date: Fri, 11 May 2012 12:31:14 -0700 > From: "H.J. Lu" > > Hi, > > This patch checks DS segment register for x32 process. Tested on > Linux/x86-64. OK to install? > > Thanks. > > H.J. > --- > * amd64-linux-nat.c (AMD64_LINUX_X32_DS): New. > (amd64_linux_read_description): Check DS segment register for > x32 process. > > diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c > index 3be8404..97c9a49 100644 > --- a/gdb/amd64-linux-nat.c > +++ b/gdb/amd64-linux-nat.c > + if (sizeof (void *) == 4 && is_64bit && !is_x32) > + error (_("Can't debug 64-bit process with 32-bit GDB")); I really think we should refuse to even build a GDB as an X32 binary.