From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3860 invoked by alias); 19 Jan 2004 16:52:37 -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 3849 invoked from network); 19 Jan 2004 16:52:36 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 19 Jan 2004 16:52:36 -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 i0JGqal07686 for ; Mon, 19 Jan 2004 11:52:36 -0500 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 i0JGqaa13843 for ; Mon, 19 Jan 2004 11:52:36 -0500 Received: from localhost.localdomain (vpn50-57.rdu.redhat.com [172.16.50.57]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i0JGqZR0013924 for ; Mon, 19 Jan 2004 11:52:35 -0500 Received: from saguaro (saguaro.lan [192.168.64.2]) by localhost.localdomain (8.12.10/8.12.10) with SMTP id i0JGqUcG031531 for ; Mon, 19 Jan 2004 09:52:30 -0700 Date: Mon, 19 Jan 2004 16:52:00 -0000 From: Kevin Buettner To: gdb-patches@sources.redhat.com Subject: Re: [RFA] target.c: eliminate one use of DEPRECATED_REGISTER_SIZE Message-Id: <20040119095230.780b83a7@saguaro> In-Reply-To: <4001A0BC.6050809@gnu.org> References: <1040109032011.ZM30010@localhost.localdomain> <4001A0BC.6050809@gnu.org> Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-01/txt/msg00505.txt.bz2 On Sun, 11 Jan 2004 14:15:08 -0500 Andrew Cagney wrote: > > default_region_size_ok_for_hw_watchpoint (int byte_count) > > { > > - return (byte_count <= DEPRECATED_REGISTER_SIZE); > > + return (byte_count <= (TARGET_PTR_BIT / TARGET_CHAR_BIT)); > > } > > > Ok, but with `TYPE_LENGTH (builtin_type_void_{code/data}_ptr)'. Here I > believe that the data pointer would be more correct. Okay. Committed. Here's what went in: * target.c (default_region_size_ok_for_hw_watchpoint): Compare the region size against the size of a pointer, not the size of a register as given by DEPRECATED_REGISTER_SIZE. Index: target.c =================================================================== RCS file: /cvs/src/src/gdb/target.c,v retrieving revision 1.69 diff -u -p -r1.69 target.c --- target.c 19 Jan 2004 01:20:11 -0000 1.69 +++ target.c 19 Jan 2004 16:45:48 -0000 @@ -1360,7 +1360,7 @@ find_default_create_inferior (char *exec static int default_region_size_ok_for_hw_watchpoint (int byte_count) { - return (byte_count <= DEPRECATED_REGISTER_SIZE); + return (byte_count <= TYPE_LENGTH (builtin_type_void_data_ptr)); } static int