From patchwork Tue Apr 25 12:09:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aktemur, Tankut Baris" X-Patchwork-Id: 68256 Return-Path: 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 ; 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 ; 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tankut Baris Aktemur via Gdb-patches From: "Aktemur, Tankut Baris" Reply-To: Tankut Baris Aktemur Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Since commit commit 7f8acedeebe295fc8cc1d11ed971cbfc1942618c Author: Pedro Alves 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. */ struct process_info *current_process (void); struct process_info *get_thread_process (const struct thread_info *);