[1/2] Use bool in continue_1
Checks
Commit Message
This changes continue_1 to use 'bool' and renames its parameter. The
renaming is important to avoid shadowing the 'all_threads' function.
---
gdb/infcmd.c | 4 ++--
gdb/inferior.h | 2 +-
gdb/mi/mi-main.c | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
Comments
> diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
> index 52e642e1464..53821e69042 100644
> --- a/gdb/mi/mi-main.c
> +++ b/gdb/mi/mi-main.c
> @@ -286,7 +286,7 @@ exec_continue (const char *const *argv, int argc)
> }
> else
> {
> - continue_1 (0);
> + continue_1 (false);
> }
Could you please remove the braces here at the same time?
Otherwise LGTM.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Simon
@@ -746,12 +746,12 @@ ensure_not_running (void)
}
void
-continue_1 (int all_threads)
+continue_1 (bool all_threads_p)
{
ERROR_NO_INFERIOR;
ensure_not_tfind_mode ();
- if (non_stop && all_threads)
+ if (non_stop && all_threads_p)
{
/* Don't error out if the current thread is running, because
there may be other stopped threads. */
@@ -225,7 +225,7 @@ extern void attach_command (const char *, int);
extern void registers_info (const char *, bool);
-extern void continue_1 (int all_threads);
+extern void continue_1 (bool all_threads_p);
extern void interrupt_target_1 (bool all_threads);
@@ -286,7 +286,7 @@ exec_continue (const char *const *argv, int argc)
}
else
{
- continue_1 (0);
+ continue_1 (false);
}
}
else
@@ -296,7 +296,7 @@ exec_continue (const char *const *argv, int argc)
if (current_context->all)
{
sched_multi = 1;
- continue_1 (0);
+ continue_1 (false);
}
else
{
@@ -304,7 +304,7 @@ exec_continue (const char *const *argv, int argc)
either all threads, or one thread, depending on the
'scheduler-locking' variable. Let's continue to do the
same. */
- continue_1 (1);
+ continue_1 (true);
}
}
}