From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 582 invoked by alias); 2 Sep 2008 12:43:46 -0000 Received: (qmail 565 invoked by uid 22791); 2 Sep 2008 12:43:45 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 02 Sep 2008 12:43:05 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id AA66E98417 for ; Tue, 2 Sep 2008 12:43:03 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 8E117981E8 for ; Tue, 2 Sep 2008 12:43:03 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KaVDq-0005s0-Vf for gdb-patches@sourceware.org; Tue, 02 Sep 2008 08:43:02 -0400 Date: Tue, 02 Sep 2008 12:43:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: [rfc][23/37] Eliminate builtin_type_ macros: Platform-neutral types for internal variables Message-ID: <20080902124302.GC21700@caradoc.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20080831175045.128504000@de.ibm.com> <20080831175131.976075000@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080831175131.976075000@de.ibm.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes 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: 2008-09/txt/msg00015.txt.bz2 On Sun, Aug 31, 2008 at 07:51:08PM +0200, Ulrich Weigand wrote: > One problem is the $_ variable, which holds a pointer value. To > allow using a platform-neutral type for this, I'm introducing a > new platform-neutral pointer type builtin_type_void_ptr. The > lenght of this type is chosen so that it can hold every CORE_ADDR > value. I don't think this is a good idea. Target-specific code should not be required to correctly handle jumbo pointers, e.g. in "(gdb) print foo ($_)". In a command function, we must already have some idea of what the associated architecture is (e.g. to initialize the architecture used by the expression evaluator); why not use that? -- Daniel Jacobowitz CodeSourcery