aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2019-07-10 12:10:51 -0400
committerSimon Marchi <simon.marchi@efficios.com>2019-07-10 12:10:51 -0400
commit4c462cb0efb40a7a1e5297946bed59286dd0cf02 (patch)
tree1beed7f99b455b599c6c5322b904cc7f66edd435 /gdb/breakpoint.c
parent89abbcc26d891425678b8b463bc1fa81273fb54c (diff)
downloadbinutils-4c462cb0efb40a7a1e5297946bed59286dd0cf02.zip
binutils-4c462cb0efb40a7a1e5297946bed59286dd0cf02.tar.gz
binutils-4c462cb0efb40a7a1e5297946bed59286dd0cf02.tar.bz2
Make some bpstat functions use bool
Change return type to bool and adjust function comments. gdb/ChangeLog: * breakpoint.h (bpstat_explains_signal, bpstat_causes_stop, bpstat_should_step): Return bool, adjust comments. * breakpoint.c (bpstat_explains_signal, bpstat_causes_stop, bpstat_should_step): Likewise.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index f780bed..fc0d72e 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4231,7 +4231,7 @@ bpstat_find_breakpoint (bpstat bsp, struct breakpoint *breakpoint)
/* See breakpoint.h. */
-int
+bool
bpstat_explains_signal (bpstat bsp, enum gdb_signal sig)
{
for (; bsp != NULL; bsp = bsp->next)
@@ -4241,17 +4241,17 @@ bpstat_explains_signal (bpstat bsp, enum gdb_signal sig)
/* A moribund location can never explain a signal other than
GDB_SIGNAL_TRAP. */
if (sig == GDB_SIGNAL_TRAP)
- return 1;
+ return true;
}
else
{
if (bsp->breakpoint_at->ops->explains_signal (bsp->breakpoint_at,
sig))
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
/* Put in *NUM the breakpoint number of the first breakpoint we are
@@ -5687,29 +5687,29 @@ bpstat_run_callbacks (bpstat bs_head)
}
}
-/* Nonzero if we should step constantly (e.g. watchpoints on machines
- without hardware support). This isn't related to a specific bpstat,
- just to things like whether watchpoints are set. */
+/* See breakpoint.h. */
-int
-bpstat_should_step (void)
+bool
+bpstat_should_step ()
{
struct breakpoint *b;
ALL_BREAKPOINTS (b)
if (breakpoint_enabled (b) && b->type == bp_watchpoint && b->loc != NULL)
- return 1;
- return 0;
+ return true;
+ return false;
}
-int
+/* See breakpoint.h. */
+
+bool
bpstat_causes_stop (bpstat bs)
{
for (; bs != NULL; bs = bs->next)
if (bs->stop)
- return 1;
+ return true;
- return 0;
+ return false;
}