From 4658f12e9c5ec0d2efb04f1688f6cd6bd9f1a47d Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Tue, 25 Apr 2017 21:32:05 +0100 Subject: [PATCH] Change readonly_p to bool This patch changes readonly_p type to bool. 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/ChangeLog | 6 ++++++ gdb/regcache.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 90ce6ae..be8df1b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2017-04-25 Yao Qi + * regcache.c (struct regcache) : Change its type + to bool. + (regcache_xmalloc_1): Update parameter type and callers update. + +2017-04-25 Yao Qi + * aarch64-tdep.c (aarch64_gdbarch_init): Don't call set_gdbarch_wchar_bit. * arm-tdep.c (arm_gdbarch_init): Likewise. 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); -- 2.7.4