public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Mention process_stratum in inferior::priv comment
@ 2023-08-14 18:07 Tom Tromey
  2023-08-14 20:34 ` John Baldwin
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2023-08-14 18:07 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

From what I can tell, inferior::priv is reserved for the
process_stratum target.  It seems to me that it has to be, because
currenlty only such targets use it, and if a target at another stratum
started using this field, then conflicts could occur.  This patch
documents this.
---
 gdb/inferior.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/inferior.h b/gdb/inferior.h
index 712f9b3f330..8f300a5bcc5 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -633,7 +633,7 @@ class inferior : public refcounted_object,
      attach or handling a fork child.  */
   bool in_initial_library_scan = false;
 
-  /* Private data used by the target vector implementation.  */
+  /* Private data used by the process_stratum target.  */
   std::unique_ptr<private_inferior> priv;
 
   /* HAS_EXIT_CODE is true if the inferior exited with an exit code.
-- 
2.40.1


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

* Re: [PATCH] Mention process_stratum in inferior::priv comment
  2023-08-14 18:07 [PATCH] Mention process_stratum in inferior::priv comment Tom Tromey
@ 2023-08-14 20:34 ` John Baldwin
  0 siblings, 0 replies; 2+ messages in thread
From: John Baldwin @ 2023-08-14 20:34 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

On 8/14/23 11:07 AM, Tom Tromey via Gdb-patches wrote:
>  From what I can tell, inferior::priv is reserved for the
> process_stratum target.  It seems to me that it has to be, because
> currenlty only such targets use it, and if a target at another stratum
> started using this field, then conflicts could occur.  This patch
> documents this.
> ---
>   gdb/inferior.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gdb/inferior.h b/gdb/inferior.h
> index 712f9b3f330..8f300a5bcc5 100644
> --- a/gdb/inferior.h
> +++ b/gdb/inferior.h
> @@ -633,7 +633,7 @@ class inferior : public refcounted_object,
>        attach or handling a fork child.  */
>     bool in_initial_library_scan = false;
>   
> -  /* Private data used by the target vector implementation.  */
> +  /* Private data used by the process_stratum target.  */
>     std::unique_ptr<private_inferior> priv;
>   
>     /* HAS_EXIT_CODE is true if the inferior exited with an exit code.


Reviewed-by: John Baldwin <jhb@FreeBSD.org>

The only two current users are darwin-nat and remote (and I'm
about to add one in fbsd-nat)

-- 
John Baldwin


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

end of thread, other threads:[~2023-08-14 20:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-14 18:07 [PATCH] Mention process_stratum in inferior::priv comment Tom Tromey
2023-08-14 20:34 ` John Baldwin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).