From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25445 invoked by alias); 4 Jan 2009 18:10:09 -0000 Received: (qmail 25436 invoked by uid 22791); 4 Jan 2009 18:10:08 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 04 Jan 2009 18:10:03 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n04IA1US007415 for ; Sun, 4 Jan 2009 13:10:01 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n04IA0XA024151; Sun, 4 Jan 2009 13:10:01 -0500 Received: from opsy.redhat.com (vpn-12-92.rdu.redhat.com [10.11.12.92]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n04I9xUL013981; Sun, 4 Jan 2009 13:10:00 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 334BE88803F; Sun, 4 Jan 2009 11:09:57 -0700 (MST) To: gdb-patches@sourceware.org Subject: Re: RFA: fix PR 9164 References: <20090104032948.GA3339@caradoc.them.org> From: Tom Tromey Reply-To: Tom Tromey Date: Sun, 04 Jan 2009 18:10:00 -0000 In-Reply-To: <20090104032948.GA3339@caradoc.them.org> (Daniel Jacobowitz's message of "Sat\, 3 Jan 2009 22\:29\:48 -0500") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-01/txt/msg00020.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: Tom> This fix defers the choice of type to the language, using the existing Tom> language-arch machinery. I fixed the C language family, including Tom> ObjC, but I left the other languages unchanged. I think the language Tom> maintainers will have to make a change here, if one is needed or Tom> desired. (FWIW I don't think Java needs a change, since I don't think Tom> it is possible to invoke sizeof when Java is the selected language.) Daniel> Before adding all this, do you know of any language where the signed Daniel> behavior is correct? Nope. I don't know that a signed type is incorrect, either. I really know nothing about the other languages here, so I chose to preserve the current behavior. Even if all languages want an unsigned type, I still think something like this patch is the way to go, because for C languages you generally want the inferior's "size_t". That is, this is the way to go assuming that we continue to have language-dependent expressions. If it weren't for UNOP_SIZEOF, I probably would have made this a C-specific patch. Another idea would be to add an evaluate_subexp_c, and have it handle UNOP_SIZEOF. Tom