From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25870 invoked by alias); 9 Jan 2004 03:20:19 -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 25855 invoked from network); 9 Jan 2004 03:20:18 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 9 Jan 2004 03:20:18 -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 i093KHg14385 for ; Thu, 8 Jan 2004 22:20:17 -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 i093KHE09460 for ; Thu, 8 Jan 2004 22:20:17 -0500 Received: from localhost.localdomain (vpn50-10.rdu.redhat.com [172.16.50.10]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i093KGnm028567 for ; Thu, 8 Jan 2004 22:20:17 -0500 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id i093KBF30011 for gdb-patches@sources.redhat.com; Thu, 8 Jan 2004 20:20:11 -0700 Date: Fri, 09 Jan 2004 03:20:00 -0000 From: Kevin Buettner Message-Id: <1040109032011.ZM30010@localhost.localdomain> To: gdb-patches@sources.redhat.com Subject: [RFA] target.c: eliminate one use of DEPRECATED_REGISTER_SIZE MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-01/txt/msg00231.txt.bz2 On FR-V, we found that hardware watchpoints were no longer working. The reason for this is that frv-tdep.c was changed a while back to no longer define DEPRECATED_REGISTER_SIZE. As a consequence, DEPRECATED_REGISTER_SIZE is always 0. This means that the expression (byte_count <= DEPRECATED_REGISTER_SIZE) always evaluates to false, which effectively (though unintentionally) means that no memory region is ever suitable for hardware watchpoints. The use of the register's size (width in bytes) in this expression was dubious to begin with. It seems to me that using the size of a pointer makes (somewhat) more sense. Okay? * 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.68 diff -u -p -r1.68 target.c --- target.c 5 Jan 2004 22:32:23 -0000 1.68 +++ target.c 9 Jan 2004 03:01:23 -0000 @@ -1362,7 +1362,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 <= (TARGET_PTR_BIT / TARGET_CHAR_BIT)); } static int