Boolify gdbserver_windows_process::child_initialization_done

Message ID 20260902163611.3526083-1-tromey@adacore.com
State New
Headers
Series Boolify gdbserver_windows_process::child_initialization_done |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply

Commit Message

Tom Tromey Sept. 2, 2026, 4:36 p.m. UTC
  This changes gdbserver_windows_process::child_initialization_done to
be a boolean.
---
 gdbserver/win32-low.cc | 4 ++--
 gdbserver/win32-low.h  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)


base-commit: 49c379f8c2f8ff888b621b4a070dc1976b942577
  

Comments

Tom de Vries Sept. 2, 2026, 5:55 p.m. UTC | #1
On 9/2/26 6:36 PM, Tom Tromey wrote:
> This changes gdbserver_windows_process::child_initialization_done to
> be a boolean.

LGTM.

Approved-By: Tom de Vries <tdevries@suse.de>

Thanks,
- Tom

> ---
>   gdbserver/win32-low.cc | 4 ++--
>   gdbserver/win32-low.h  | 4 ++--
>   2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc
> index 13c14a7c69f..2cb5ab5d170 100644
> --- a/gdbserver/win32-low.cc
> +++ b/gdbserver/win32-low.cc
> @@ -317,7 +317,7 @@ do_initial_child_stuff (HANDLE proch, DWORD pid, int attached)
>   
>     proc = add_process (pid, attached);
>     child_init_thread_list ();
> -  windows_process.child_initialization_done = 0;
> +  windows_process.child_initialization_done = false;
>   
>     if (the_low_target.initial_stuff != NULL)
>       (*the_low_target.initial_stuff) (proc);
> @@ -373,7 +373,7 @@ do_initial_child_stuff (HANDLE proch, DWORD pid, int attached)
>       = inferior_started_by_cygwin (pid, attached);
>   #endif
>   
> -  windows_process.child_initialization_done = 1;
> +  windows_process.child_initialization_done = true;
>   }
>   
>   /* Resume all artificially suspended threads if we are continuing
> diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h
> index 439adb84bc2..443af62c9c7 100644
> --- a/gdbserver/win32-low.h
> +++ b/gdbserver/win32-low.h
> @@ -197,9 +197,9 @@ struct gdbserver_windows_process : public windows_nat::windows_process_info
>     /* True if current_process_handle needs to be closed.  */
>     bool open_process_used = false;
>   
> -  /* Zero during the child initialization phase, and nonzero
> +  /* False during the child initialization phase, and true
>        otherwise.  */
> -  int child_initialization_done = 0;
> +  bool child_initialization_done = false;
>   };
>   
>   /* The sole Windows process.  */
> 
> base-commit: 49c379f8c2f8ff888b621b4a070dc1976b942577
  

Patch

diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc
index 13c14a7c69f..2cb5ab5d170 100644
--- a/gdbserver/win32-low.cc
+++ b/gdbserver/win32-low.cc
@@ -317,7 +317,7 @@  do_initial_child_stuff (HANDLE proch, DWORD pid, int attached)
 
   proc = add_process (pid, attached);
   child_init_thread_list ();
-  windows_process.child_initialization_done = 0;
+  windows_process.child_initialization_done = false;
 
   if (the_low_target.initial_stuff != NULL)
     (*the_low_target.initial_stuff) (proc);
@@ -373,7 +373,7 @@  do_initial_child_stuff (HANDLE proch, DWORD pid, int attached)
     = inferior_started_by_cygwin (pid, attached);
 #endif
 
-  windows_process.child_initialization_done = 1;
+  windows_process.child_initialization_done = true;
 }
 
 /* Resume all artificially suspended threads if we are continuing
diff --git a/gdbserver/win32-low.h b/gdbserver/win32-low.h
index 439adb84bc2..443af62c9c7 100644
--- a/gdbserver/win32-low.h
+++ b/gdbserver/win32-low.h
@@ -197,9 +197,9 @@  struct gdbserver_windows_process : public windows_nat::windows_process_info
   /* True if current_process_handle needs to be closed.  */
   bool open_process_used = false;
 
-  /* Zero during the child initialization phase, and nonzero
+  /* False during the child initialization phase, and true
      otherwise.  */
-  int child_initialization_done = 0;
+  bool child_initialization_done = false;
 };
 
 /* The sole Windows process.  */