From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29810 invoked by alias); 31 Jul 2008 12:17:01 -0000 Received: (qmail 29797 invoked by uid 22791); 31 Jul 2008 12:17:00 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 31 Jul 2008 12:16:43 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m6VCGfsD031902 for ; Thu, 31 Jul 2008 08:16:41 -0400 Received: from file.rdu.redhat.com (file.rdu.redhat.com [10.11.255.147]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6VCGfk3015684 for ; Thu, 31 Jul 2008 08:16:41 -0400 Received: from localhost.localdomain (vpn-4-146.str.redhat.com [10.32.4.146]) by file.rdu.redhat.com (8.13.1/8.13.1) with ESMTP id m6VCGdBe020895 for ; Thu, 31 Jul 2008 08:16:40 -0400 Message-ID: <4891AD28.4000005@redhat.com> Date: Thu, 31 Jul 2008 12:17:00 -0000 From: Phil Muldoon User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: PATCH: Always use breakpoint_enabled in breakpoint.c Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-07/txt/msg00580.txt.bz2 While stepping though breakpoint.c, I noticed two trivial areas of breakpoint checking that were not using the breakpoint_enabled function. Change to consistently use the breakpoint_enabled function over directly checking the breakpoint->enable_state. 2008-07-31 Phil Muldoon * breakpoint.c (hw_breakpoint_used_count): Use breakpoint_enabled(). (insert_breakpoint_locations): Likewise. Index: gdb/breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.338 diff -u -r1.338 breakpoint.c --- gdb/breakpoint.c 28 Jul 2008 17:53:52 -0000 1.338 +++ gdb/breakpoint.c 31 Jul 2008 12:14:22 -0000 @@ -1320,7 +1320,7 @@ if (!is_hardware_watchpoint (bpt)) continue; - if (bpt->enable_state != bp_enabled) + if (!breakpoint_enabled (bpt)) continue; if (bpt->disposition == disp_del_at_next_stop) @@ -4768,7 +4768,7 @@ ALL_BREAKPOINTS (b) { - if (b->type == bp_hardware_breakpoint && b->enable_state == bp_enabled) + if (b->type == bp_hardware_breakpoint && breakpoint_enabled (b)) i++; }