From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11927 invoked by alias); 25 Jun 2007 19:05:03 -0000 Received: (qmail 11909 invoked by uid 22791); 25 Jun 2007 19:05:02 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 25 Jun 2007 19:04:56 +0000 Received: (qmail 30253 invoked from network); 25 Jun 2007 19:04:54 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 25 Jun 2007 19:04:54 -0000 To: Michael Eager Cc: gdb@sources.redhat.com Subject: Re: Non-uniform address spaces References: <467D4AE3.7020505@eagercon.com> <20070623212557.GB3448@caradoc.them.org> <467D9503.9060804@eagercon.com> <46800482.4020700@eagercon.com> From: Jim Blandy Date: Mon, 25 Jun 2007 19:05:00 -0000 In-Reply-To: <46800482.4020700@eagercon.com> (Michael Eager's message of "Mon, 25 Jun 2007 11:08:02 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00252.txt.bz2 Michael Eager writes: > This is the problem: the pervasive assumption in GDB is that a CORE_ADDR > is a simple, linear value. In a NUMA architecture, this is not true. > Actual pointers on the hardware may be simple addresses, but they may be > in arbitrary address spaces. The translation to a target address is OK, > but the operations on CORE_ADDR are incorrect. Can you show me a specific example? (I think using a 128-bit CORE_ADDR is probably the way to go.) > Operations as simple as array indexing may require a computation that > is more complex than a simple multiplication. An array may be split > between multiple address spaces. The computation may not be complex, > but it is not as simple as a multiply and addition. This, I'd really like to learn more about. How do you declare such an array? How do you index it? What code is generated for an array access? How does it relate to C's rules for pointer arithmetic? >> I think you'll find that the operations on CORE_ADDR itself will all >> be harmless. GDB shouldn't be walking off the end of an object >> anyway, so if objects don't overlap address space boundaries, then GDB >> won't either. > > The assumption that objects don't cross address space boundaries > is not valid. Multiprocessor systems split data across multiple > processors, each of which has a separate data space. There I'm using 'object' in the sense the C standard uses it. If you can answer my questions above, I think I'll understand this better.