This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Simplify regcache_dup
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Sat, 29 Apr 2017 04:58:04 -0400
- Subject: [binutils-gdb] Simplify regcache_dup
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT b421c83cb866120ab347d60fda20fb0e2011be8c ***
Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: b421c83cb866120ab347d60fda20fb0e2011be8c
Simplify regcache_dup
regcache_dup, in fact, is to create a readonly regcache from a
non-readonly regcache. This patch adds an assert that src is not
readonly.
gdb:
2017-04-28 Yao Qi <yao.qi@linaro.org>
* regcache.c (regcache_dup): Assert !src->m_readonly_p and
call method save instead of regcache_cpy.
* regcache.h (struct regcache): Make regcache_dup a friend.