From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16665 invoked by alias); 22 Feb 2010 17:03:11 -0000 Received: (qmail 16536 invoked by uid 22791); 22 Feb 2010 17:03:10 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Feb 2010 17:03:07 +0000 Received: (qmail 11702 invoked from network); 22 Feb 2010 17:03:05 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 22 Feb 2010 17:03:05 -0000 Date: Mon, 22 Feb 2010 17:03:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: hjl.tools@gmail.com, gdb-patches@sourceware.org Subject: Re: PATCH: Enable x86 XML target descriptions Message-ID: <20100222170303.GG9493@caradoc.them.org> References: <20100218054312.GA9022@lucon.org> <20100218153402.GA27929@lucon.org> <20100218230135.GA17916@intel.com> <201002221342.o1MDgSZA029705@glazunov.sibelius.xs4all.nl> <20100222144141.GA30100@caradoc.them.org> <6dc9ffc81002220734i15bd1279mb54cb0b64a37f3dc@mail.gmail.com> <20100222155243.GC30100@caradoc.them.org> <6dc9ffc81002220757v5e9b48bdnba56a260f0f3c0a8@mail.gmail.com> <20100222161040.GD30100@caradoc.them.org> <201002221656.o1MGuw5q009795@glazunov.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002221656.o1MGuw5q009795@glazunov.sibelius.xs4all.nl> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-02/txt/msg00544.txt.bz2 On Mon, Feb 22, 2010 at 05:56:58PM +0100, Mark Kettenis wrote: > I've looked at the Linux kernel sources for the kernel on my > workstation (2.6.27 in its OpenSUSE incarnation), and the only way to > distinguish between a 32-bit and a 64-bit process seems to be to > attempt to write one of the debug address registers with a value > that's larger than 0xffffffff. If that fails, you have a 32-bit > process, otherwise it's a 64-bit process. Yuck :-( But I didn't see anything else either. Is there an eflags bit for this? Even if so, IIRC, we may not want to use it; it's possible to run 32-bit code in a 64-bit process and some overly clever programs may do so. -- Daniel Jacobowitz CodeSourcery