Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
To: gdb-patches@sourceware.org
Subject: PATCH: Always use breakpoint_enabled in breakpoint.c
Date: Thu, 31 Jul 2008 12:17:00 -0000	[thread overview]
Message-ID: <4891AD28.4000005@redhat.com> (raw)

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  <pmuldoon@redhat.com>

    * 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++;
   }


             reply	other threads:[~2008-07-31 12:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31 12:17 Phil Muldoon [this message]
2008-08-05 23:35 ` reping: " Phil Muldoon
2008-08-05 23:47   ` Stan Shebs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4891AD28.4000005@redhat.com \
    --to=pmuldoon@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox