This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 1/6 OBV] Change readonly_p to bool
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 25 Apr 2017 21:28:21 +0100
- Subject: [PATCH 1/6 OBV] Change readonly_p to bool
- Authentication-results: sourceware.org; auth=none
- References: <1493152106-3246-1-git-send-email-yao.qi@linaro.org>
This patch changes readonly_p type to bool. It is obvious, and I'll push
it in.
gdb:
2017-04-25 Yao Qi <yao.qi@linaro.org>
* regcache.c (struct regcache) <readonly_p>: 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);
--
1.9.1