Change readonly_p to bool

This patch changes readonly_p type to bool.

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.
This commit is contained in:
Yao Qi
2017-04-25 21:32:05 +01:00
parent c4ab9505b5
commit 4658f12e9c
2 changed files with 10 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
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.
2017-04-25 Yao Qi <yao.qi@linaro.org> 2017-04-25 Yao Qi <yao.qi@linaro.org>
* aarch64-tdep.c (aarch64_gdbarch_init): Don't call * aarch64-tdep.c (aarch64_gdbarch_init): Don't call

View File

@@ -209,7 +209,7 @@ struct regcache
cache can only be updated via the methods regcache_dup() and cache can only be updated via the methods regcache_dup() and
regcache_cpy(). The actual contents are determined by the regcache_cpy(). The actual contents are determined by the
reggroup_save and reggroup_restore methods. */ reggroup_save and reggroup_restore methods. */
int readonly_p; bool readonly_p;
/* If this is a read-write cache, which thread's registers is /* If this is a read-write cache, which thread's registers is
it connected to? */ it connected to? */
ptid_t ptid; ptid_t ptid;
@@ -227,7 +227,7 @@ regcache_get_ptid (const struct regcache *regcache)
static struct regcache * static struct regcache *
regcache_xmalloc_1 (struct gdbarch *gdbarch, struct address_space *aspace, regcache_xmalloc_1 (struct gdbarch *gdbarch, struct address_space *aspace,
int readonly_p) bool readonly_p)
{ {
struct regcache_descr *descr; struct regcache_descr *descr;
struct regcache *regcache; struct regcache *regcache;
@@ -259,7 +259,7 @@ regcache_xmalloc_1 (struct gdbarch *gdbarch, struct address_space *aspace,
struct regcache * struct regcache *
regcache_xmalloc (struct gdbarch *gdbarch, struct address_space *aspace) regcache_xmalloc (struct gdbarch *gdbarch, struct address_space *aspace)
{ {
return regcache_xmalloc_1 (gdbarch, aspace, 1); return regcache_xmalloc_1 (gdbarch, aspace, true);
} }
void void
@@ -507,7 +507,7 @@ get_thread_arch_aspace_regcache (ptid_t ptid, struct gdbarch *gdbarch,
&& get_regcache_arch (list->regcache) == gdbarch) && get_regcache_arch (list->regcache) == gdbarch)
return list->regcache; return list->regcache;
new_regcache = regcache_xmalloc_1 (gdbarch, aspace, 0); new_regcache = regcache_xmalloc_1 (gdbarch, aspace, false);
new_regcache->ptid = ptid; new_regcache->ptid = ptid;
list = XNEW (struct regcache_list); list = XNEW (struct regcache_list);