diff options
author | Keith Seitz <keiths@redhat.com> | 2017-08-17 13:58:01 -0700 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2017-08-17 13:58:01 -0700 |
commit | b5f28d7abc02ca509e389fa932d725cf111e4b40 (patch) | |
tree | 57a0dc0feaff890630a6ba2c9fab811d56b1f9cf /gdb/regcache.c | |
parent | 2a95a158fae932f758d75a1178a40d4cc4804ff0 (diff) | |
parent | 1a457753cfad05989574c671a221ffce2d5df703 (diff) | |
download | binutils-users/pmuldoon/c++compile.zip binutils-users/pmuldoon/c++compile.tar.gz binutils-users/pmuldoon/c++compile.tar.bz2 |
Update w/HEADusers/pmuldoon/c++compile
Problems:
gdb/compile/compile.c
gdb/cp-support.c
gdb/cp-support.h
gdb/gdbtypes.h
gdb/language.c
gdb/linespec.c
Diffstat (limited to 'gdb/regcache.c')
-rw-r--r-- | gdb/regcache.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c index 7eeb737..e8f92d6 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -388,36 +388,9 @@ regcache_cpy (struct regcache *dst, struct regcache *src) gdb_assert (src != NULL && dst != NULL); gdb_assert (src->m_descr->gdbarch == dst->m_descr->gdbarch); gdb_assert (src != dst); - gdb_assert (src->m_readonly_p || dst->m_readonly_p); + gdb_assert (src->m_readonly_p && !dst->m_readonly_p); - if (!src->m_readonly_p) - regcache_save (dst, do_cooked_read, src); - else if (!dst->m_readonly_p) - dst->restore (src); - else - dst->cpy_no_passthrough (src); -} - -/* Copy/duplicate the contents of a register cache. Unlike regcache_cpy, - which is pass-through, this does not go through to the target. - Only values values already in the cache are transferred. The SRC and DST - buffers must not overlap. */ - -void -regcache::cpy_no_passthrough (struct regcache *src) -{ - gdb_assert (src != NULL); - gdb_assert (src->m_descr->gdbarch == m_descr->gdbarch); - /* NOTE: cagney/2002-05-17: Don't let the caller do a no-passthrough - move of data into a thread's regcache. Doing this would be silly - - it would mean that regcache->register_status would be - completely invalid. */ - gdb_assert (m_readonly_p && src->m_readonly_p); - - memcpy (m_registers, src->m_registers, - m_descr->sizeof_cooked_registers); - memcpy (m_register_status, src->m_register_status, - m_descr->sizeof_cooked_register_status); + dst->restore (src); } struct regcache * |