[binutils-gdb] Use bool in continue_1
Tom Tromey via Gdb-cvs <[email protected]> Wed, 22 Jul 2026 18:21:54 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dc50c399662a4= 92fb05d441a0468a7f84898ed7bb commit c50c399662a492fb05d441a0468a7f84898ed7bb Author: Tom Tromey <[email protected]> Date: Wed May 13 09:54:18 2026 -0600 Use bool in continue_1 =20 This changes continue_1 to use 'bool' and renames its parameter. The renaming is important to avoid shadowing the 'all_threads' function. =20 Approved-By: Simon Marchi <[email protected]> Diff: --- gdb/infcmd.c | 4 ++-- gdb/inferior.h | 2 +- gdb/mi/mi-main.c | 8 +++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gdb/infcmd.c b/gdb/infcmd.c index bd5dbb02f48..f1aa552d9bc 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -746,12 +746,12 @@ ensure_not_running (void) } =20 void -continue_1 (int all_threads) +continue_1 (bool all_threads_p) { ERROR_NO_INFERIOR; ensure_not_tfind_mode (); =20 - 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. */ diff --git a/gdb/inferior.h b/gdb/inferior.h index 5c7a52319e7..217741adc07 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -225,7 +225,7 @@ extern void attach_command (const char *, int); =20 extern void registers_info (const char *, bool); =20 -extern void continue_1 (int all_threads); +extern void continue_1 (bool all_threads_p); =20 extern void interrupt_target_1 (bool all_threads); =20 diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 73c64b82186..cc3ed6d3358 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -285,9 +285,7 @@ exec_continue (const char *const *argv, int argc) disable_commit_resumed.reset_and_commit (); } else - { - continue_1 (0); - } + continue_1 (false); } else { @@ -296,7 +294,7 @@ exec_continue (const char *const *argv, int argc) if (current_context->all) { sched_multi =3D 1; - continue_1 (0); + continue_1 (false); } else { @@ -304,7 +302,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); } } }