From patchwork Tue Apr 25 20:28:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 20153 Received: (qmail 116576 invoked by alias); 25 Apr 2017 20:28:36 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 116521 invoked by uid 89); 25 Apr 2017 20:28:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=5077 X-HELO: mail-wm0-f65.google.com Received: from mail-wm0-f65.google.com (HELO mail-wm0-f65.google.com) (74.125.82.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Apr 2017 20:28:33 +0000 Received: by mail-wm0-f65.google.com with SMTP id y10so17121809wmh.0 for ; Tue, 25 Apr 2017 13:28:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=nyApICXCZz51rrFOio6/ZA4rV+LesvtWEWB+SZpaaII=; b=dpqO40BKiVTlTlWTezPsI+Lt4fFvnXmtUcOXqfVq9rzBOUsnxUzSaH5K0iYUi4yul6 MEsRaZDLhqXUHRplHDN2OOdLhh0zIF3OY9P8boWqsuYejz5FAupKGVKLh/TPvywRpSJG mUBRaWIdv904J39mIpgrb98FCXsdZQ0S6noCDYXUrWu3a7IXFnABJBL+fCsbPqLm/Nk0 dVdBcDUFdOA2kNRTuVL2cVwgYWibndbgSrl/dr7uO8XFRfDtlbTSIsVpQt5OKe1WNvKb z5KH/ht8iJGlwd/gbbQLmCfygcEUMeLLFM1VLw55s61McCf1YNxoDUtbotFycKA9TCDa V5DQ== X-Gm-Message-State: AN3rC/5dK8jQkV1RQzW4edubQrLJr6xjlhbbGs7s6srxhC3dqTdOVHNn c3UfoWg3sCoQHKyM X-Received: by 10.28.111.213 with SMTP id c82mr3160647wmi.11.1493152113185; Tue, 25 Apr 2017 13:28:33 -0700 (PDT) Received: from E107787-LIN.Home ([194.214.185.158]) by smtp.gmail.com with ESMTPSA id d17sm5635491wmi.21.2017.04.25.13.28.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Apr 2017 13:28:32 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 1/6 OBV] Change readonly_p to bool Date: Tue, 25 Apr 2017 21:28:21 +0100 Message-Id: <1493152106-3246-2-git-send-email-yao.qi@linaro.org> In-Reply-To: <1493152106-3246-1-git-send-email-yao.qi@linaro.org> References: <1493152106-3246-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes This patch changes readonly_p type to bool. It is obvious, and I'll push it in. gdb: 2017-04-25 Yao Qi * regcache.c (struct regcache) : Change its type to bool. (regcache_xmalloc_1): Update parameter type and callers update. --- gdb/regcache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/regcache.c b/gdb/regcache.c index 41c23a5..966f0c7 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -209,7 +209,7 @@ struct regcache cache can only be updated via the methods regcache_dup() and regcache_cpy(). The actual contents are determined by the reggroup_save and reggroup_restore methods. */ - int readonly_p; + bool readonly_p; /* If this is a read-write cache, which thread's registers is it connected to? */ ptid_t ptid; @@ -227,7 +227,7 @@ regcache_get_ptid (const struct regcache *regcache) static struct regcache * regcache_xmalloc_1 (struct gdbarch *gdbarch, struct address_space *aspace, - int readonly_p) + bool readonly_p) { struct regcache_descr *descr; struct regcache *regcache; @@ -259,7 +259,7 @@ regcache_xmalloc_1 (struct gdbarch *gdbarch, struct address_space *aspace, struct regcache * regcache_xmalloc (struct gdbarch *gdbarch, struct address_space *aspace) { - return regcache_xmalloc_1 (gdbarch, aspace, 1); + return regcache_xmalloc_1 (gdbarch, aspace, true); } void @@ -507,7 +507,7 @@ get_thread_arch_aspace_regcache (ptid_t ptid, struct gdbarch *gdbarch, && get_regcache_arch (list->regcache) == gdbarch) return list->regcache; - new_regcache = regcache_xmalloc_1 (gdbarch, aspace, 0); + new_regcache = regcache_xmalloc_1 (gdbarch, aspace, false); new_regcache->ptid = ptid; list = XNEW (struct regcache_list);