+2011-01-31 Tom Tromey <tromey@redhat.com>
+
+ * breakpoint.h (user_breakpoint_p): Declare.
+ * breakpoint.c (user_breakpoint_p): New function.
+ (breakpoint_1): Use it.
+ (save_breakpoints): Likewise.
+
2011-01-31 Joel Brobecker <brobecker@adacore.com>
* configure.ac: Add handling of Python distribution on Windows.
|| is_watchpoint (b));
}
+/* Return true if this breakpoint was set by the user, false if it is
+ internal or momentary. */
+
+int
+user_breakpoint_p (struct breakpoint *b)
+{
+ return user_settable_breakpoint (b) && b->number > 0;
+}
+
/* Print information on user settable breakpoint (watchpoint, etc)
number BNUM. If BNUM is -1 print all user-settable breakpoints.
If ALLFLAG is non-zero, include non-user-settable breakpoints. If
if (filter && !filter (b))
continue;
- if (allflag || (user_settable_breakpoint (b)
- && b->number > 0))
+ if (allflag || user_breakpoint_p (b))
{
int addr_bit, type_len;
/* We only print out user settable breakpoints unless the
allflag is set. */
- if (allflag || (user_settable_breakpoint (b)
- && b->number > 0))
+ if (allflag || user_breakpoint_p (b))
print_one_breakpoint (b, &last_loc, print_address_bits, allflag);
}
}
ALL_BREAKPOINTS (tp)
{
/* Skip internal and momentary breakpoints. */
- if (!user_settable_breakpoint (tp) || tp->number < 0)
+ if (!user_breakpoint_p (tp))
continue;
/* If we have a filter, only save the breakpoints it accepts. */
ALL_BREAKPOINTS (tp)
{
/* Skip internal and momentary breakpoints. */
- if (!user_settable_breakpoint (tp) || tp->number < 0)
+ if (!user_breakpoint_p (tp))
continue;
/* If we have a filter, only save the breakpoints it accepts. */