Message ID | 232ee024f5b957a07c047c724d7065074da1ef34.1677582745.git.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 C89A8384FB7E for <patchwork@sourceware.org>; Tue, 28 Feb 2023 11:31:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C89A8384FB7E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677583914; bh=iC6kVUFiPxluFX1BZOTxTJAYZJSGE1GMVuRB9nKG+y0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=XTByMyW9LHtVcqqa0+Qon/1z7gXieq08pSRXOKPB22kDpOxhHbbaqQSfXXukTaHGf utSBsPqdFMlUeFvLWKNJsLezFtNGjk4t4aCKhwsEMyA8Im05oO6N4cm0xjWF37ut0b nMj96QBGY5htJqYaSGGa+G79Jyko0ixz2T5jalog= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by sourceware.org (Postfix) with ESMTPS id EEE5E384F488 for <gdb-patches@sourceware.org>; Tue, 28 Feb 2023 11:31:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EEE5E384F488 X-IronPort-AV: E=McAfee;i="6500,9779,10634"; a="336401770" X-IronPort-AV: E=Sophos;i="5.98,221,1673942400"; d="scan'208";a="336401770" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2023 03:31:17 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10634"; a="817058311" X-IronPort-AV: E=Sophos;i="5.98,221,1673942400"; d="scan'208";a="817058311" Received: from ultl2604.iul.intel.com (HELO localhost) ([172.28.48.47]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2023 03:31:16 -0800 To: gdb-patches@sourceware.org Subject: [PATCH 24/26] gdbserver: return tracked register status in regcache_raw_read_unsigned Date: Tue, 28 Feb 2023 12:28:22 +0100 Message-Id: <232ee024f5b957a07c047c724d7065074da1ef34.1677582745.git.tankut.baris.aktemur@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <cover.1677582744.git.tankut.baris.aktemur@intel.com> References: <cover.1677582744.git.tankut.baris.aktemur@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP 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: refactor regcache and allow gradually populating
|
|
Commit Message
Aktemur, Tankut Baris
Feb. 28, 2023, 11:28 a.m. UTC
In regcache_raw_read_unsigned, we unconditionally return REG_VALID as the register status. This does not seem right, since the register may in fact be in another state, such as REG_UNAVAILABLE. Return the tracked status. --- gdbserver/regcache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 2023-02-28 06:28, Tankut Baris Aktemur via Gdb-patches wrote: > In regcache_raw_read_unsigned, we unconditionally return REG_VALID as > the register status. This does not seem right, since the register may > in fact be in another state, such as REG_UNAVAILABLE. Return the > tracked status. > --- > gdbserver/regcache.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdbserver/regcache.cc b/gdbserver/regcache.cc > index 32f0e1109e6..4533e9e9b12 100644 > --- a/gdbserver/regcache.cc > +++ b/gdbserver/regcache.cc > @@ -451,7 +451,7 @@ regcache_raw_read_unsigned (struct regcache *regcache, int regnum, > *val = 0; > collect_register (regcache, regnum, val); > > - return REG_VALID; > + return regcache->get_register_status (regnum); > } > > #ifndef IN_PROCESS_AGENT LGTM. You can push it right away, if you think it makes sense. Approved-By: Simon Marchi <simon.marchi@efficios.com> Simon
diff --git a/gdbserver/regcache.cc b/gdbserver/regcache.cc index 32f0e1109e6..4533e9e9b12 100644 --- a/gdbserver/regcache.cc +++ b/gdbserver/regcache.cc @@ -451,7 +451,7 @@ regcache_raw_read_unsigned (struct regcache *regcache, int regnum, *val = 0; collect_register (regcache, regnum, val); - return REG_VALID; + return regcache->get_register_status (regnum); } #ifndef IN_PROCESS_AGENT