Message ID | 20230425120948.2604327-1-tankut.baris.aktemur@intel.com |
---|---|
State | New |
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5967B3858C2C for <patchwork@sourceware.org>; Tue, 25 Apr 2023 12:10:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5967B3858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1682424633; bh=NgHiuf67xE44ZhceQzumw5tq36xQS2eNNxtNmFqfTaI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ITJxdLDXn87d237kFZsEDrvlGqH2tqAhB8PUKap+mEc4Bat9gDMA8goYFxSoxH2XF bsJw7DjiKnyjhovSg6XzP4m6F8j3+pcK4KtBQJp7pk/mDBRAElk4ywUSez+ic0cGon XFascnmkeS00kiEzav+wehMo9TpAM8IRAAL8tgvU= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by sourceware.org (Postfix) with ESMTPS id 28B1C3858D1E for <gdb-patches@sourceware.org>; Tue, 25 Apr 2023 12:10:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 28B1C3858D1E X-IronPort-AV: E=McAfee;i="6600,9927,10690"; a="409694929" X-IronPort-AV: E=Sophos;i="5.99,225,1677571200"; d="scan'208";a="409694929" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2023 05:10:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10690"; a="817666844" X-IronPort-AV: E=Sophos;i="5.99,225,1677571200"; d="scan'208";a="817666844" Received: from ultl2604.iul.intel.com (HELO localhost) ([172.28.48.47]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2023 05:10:07 -0700 To: gdb-patches@sourceware.org Subject: [PATCH] gdbserver: update the comment of 'current_process' Date: Tue, 25 Apr 2023 14:09:48 +0200 Message-Id: <20230425120948.2604327-1-tankut.baris.aktemur@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.2 required=5.0 tests=AC_FROM_MANY_DOTS, BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Tankut Baris Aktemur via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
gdbserver: update the comment of 'current_process'
|
|
Commit Message
Aktemur, Tankut Baris
April 25, 2023, 12:09 p.m. UTC
Since commit commit 7f8acedeebe295fc8cc1d11ed971cbfc1942618c Author: Pedro Alves <pedro@palves.net> Date: Tue Apr 5 13:57:11 2022 +0100 gdbserver: track current process as well as current thread current process is tracked separately and may be non-null while the current thread is null. Update the comment of the current_process function accordingly. --- gdbserver/inferiors.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Comments
Tankut Baris Aktemur via Gdb-patches <gdb-patches@sourceware.org> writes: > Since commit > > commit 7f8acedeebe295fc8cc1d11ed971cbfc1942618c > Author: Pedro Alves <pedro@palves.net> > Date: Tue Apr 5 13:57:11 2022 +0100 > > gdbserver: track current process as well as current thread > > current process is tracked separately and may be non-null > while the current thread is null. Update the comment of the > current_process function accordingly. > --- > gdbserver/inferiors.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/gdbserver/inferiors.h b/gdbserver/inferiors.h > index a0ba9906097..9a41e66cb39 100644 > --- a/gdbserver/inferiors.h > +++ b/gdbserver/inferiors.h > @@ -92,9 +92,9 @@ pid_of (const process_info *proc) > return proc->pid; > } > > -/* Return a pointer to the process that corresponds to the current > - thread (current_thread). It is an error to call this if there is > - no current thread selected. */ > +/* Return a pointer to the current process. Note that the current > + process may be non-null while the current thread (current_thread) > + is null. */ I'm wondering if the bit about "It is an error to call this if there is no current thread selected." should be retained, or at least changed to "It is an error to call this if there is no current process selected." - and that the assert (removed in 7f8acedeebe295 should be added back. I've asked Pedro about this: https://sourceware.org/pipermail/gdb-patches/2023-April/199097.html Thanks, Andrew > > struct process_info *current_process (void); > struct process_info *get_thread_process (const struct thread_info *); > -- > 2.25.1 > > Intel Deutschland GmbH > Registered Address: Am Campeon 10, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de> > Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928
On Tuesday, April 25, 2023 3:59 PM, Andrew Burgess wrote: > Tankut Baris Aktemur via Gdb-patches <gdb-patches@sourceware.org> > writes: > > > Since commit > > > > commit 7f8acedeebe295fc8cc1d11ed971cbfc1942618c > > Author: Pedro Alves <pedro@palves.net> > > Date: Tue Apr 5 13:57:11 2022 +0100 > > > > gdbserver: track current process as well as current thread > > > > current process is tracked separately and may be non-null > > while the current thread is null. Update the comment of the > > current_process function accordingly. > > --- > > gdbserver/inferiors.h | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/gdbserver/inferiors.h b/gdbserver/inferiors.h > > index a0ba9906097..9a41e66cb39 100644 > > --- a/gdbserver/inferiors.h > > +++ b/gdbserver/inferiors.h > > @@ -92,9 +92,9 @@ pid_of (const process_info *proc) > > return proc->pid; > > } > > > > -/* Return a pointer to the process that corresponds to the current > > - thread (current_thread). It is an error to call this if there is > > - no current thread selected. */ > > +/* Return a pointer to the current process. Note that the current > > + process may be non-null while the current thread (current_thread) > > + is null. */ > > I'm wondering if the bit about "It is an error to call this if there is > no current thread selected." should be retained, or at least changed to > "It is an error to call this if there is no current process selected." - > and that the assert (removed in 7f8acedeebe295 should be added back. > > I've asked Pedro about this: > > https://sourceware.org/pipermail/gdb-patches/2023-April/199097.html > > Thanks, > Andrew Thanks for the feedback, Andrew. I replied to the other thread to continue the discussion there. Regards -Baris Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de> Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928
diff --git a/gdbserver/inferiors.h b/gdbserver/inferiors.h index a0ba9906097..9a41e66cb39 100644 --- a/gdbserver/inferiors.h +++ b/gdbserver/inferiors.h @@ -92,9 +92,9 @@ pid_of (const process_info *proc) return proc->pid; } -/* Return a pointer to the process that corresponds to the current - thread (current_thread). It is an error to call this if there is - no current thread selected. */ +/* Return a pointer to the current process. Note that the current + process may be non-null while the current thread (current_thread) + is null. */ struct process_info *current_process (void); struct process_info *get_thread_process (const struct thread_info *);