This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Always use breakpoint_enabled in breakpoint.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]