From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31690 invoked by alias); 14 May 2003 16:42:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31670 invoked from network); 14 May 2003 16:42:12 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 14 May 2003 16:42:12 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h4EGgBH14197 for ; Wed, 14 May 2003 12:42:11 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h4EGgAI13446; Wed, 14 May 2003 12:42:10 -0400 Received: from localhost.localdomain (vpn50-3.rdu.redhat.com [172.16.50.3]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h4EGg8Q16485; Wed, 14 May 2003 12:42:08 -0400 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h4EGg1x09356; Wed, 14 May 2003 09:42:01 -0700 Date: Wed, 14 May 2003 16:42:00 -0000 From: Kevin Buettner Message-Id: <1030514164201.ZM9355@localhost.localdomain> In-Reply-To: Andrew Cagney "[patch rfc] Eliminate extract_address" (May 14, 8:10am) References: <3EC23225.4090605@redhat.com> To: Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: [patch rfc] Eliminate extract_address MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-05/txt/msg00215.txt.bz2 Can you explain why you doing s/extract_address/extract_unsigned_integer/ is a good thing? Perhaps this has been discussed already, but I see two drawbacks... First, the return types are different. extract_address() returns CORE_ADDR while extract_unsigned_integer returns ULONGEST. If we were to encounter a scenario where this is a problem, it's easier to fix a wrapper (extract_address()) instead of the myriad places in the code which presently call extract_address(). (This point is probably moot because I suspect we already have a lot of code which assumes that CORE_ADDR may be interchanged with LONGEST or ULONGEST anyway.) Second, having function calls to extract_address() provides information to the reader that you don't get by having calls to extract_unsigned_integer(). It tells the reader that we're expecting to get an address and not an integer. This really helps when someone reading gdb's code is wondering about what the thing is that's being extracted. Kevin