Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Boolify gdbserver_windows_process::child_initialization_done
@ 2026-09-02 16:36 Tom Tromey
  2026-09-02 17:55 ` Tom de Vries
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2026-09-02 16:36 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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(-)

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
-- 
2.55.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Boolify gdbserver_windows_process::child_initialization_done
  2026-09-02 16:36 [PATCH] Boolify gdbserver_windows_process::child_initialization_done Tom Tromey
@ 2026-09-02 17:55 ` Tom de Vries
  0 siblings, 0 replies; 2+ messages in thread
From: Tom de Vries @ 2026-09-02 17:55 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-02 17:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-02 16:36 [PATCH] Boolify gdbserver_windows_process::child_initialization_done Tom Tromey
2026-09-02 17:55 ` Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox