From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79106 invoked by alias); 8 May 2015 20:22:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 79027 invoked by uid 89); 8 May 2015 20:22:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 08 May 2015 20:22:03 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t48KM1sq029020 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 8 May 2015 16:22:01 -0400 Received: from host1.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t48KM0eT028212 for ; Fri, 8 May 2015 16:22:00 -0400 Subject: [PATCH 6/6] Make regcache_cpy_no_passthrough static From: Jan Kratochvil To: gdb-patches@sourceware.org Date: Fri, 08 May 2015 20:22:00 -0000 Message-ID: <20150508202159.15830.97494.stgit@host1.jankratochvil.net> In-Reply-To: <20150508202119.15830.18218.stgit@host1.jankratochvil.net> References: <20150508202119.15830.18218.stgit@host1.jankratochvil.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00223.txt.bz2 Hi, regcache_cpy_no_passthrough is no longer used for a standalone call. Jan gdb/ChangeLog 2015-05-08 Jan Kratochvil * regcache.c (regcache_cpy_no_passthrough): New declaration. (regcache_cpy_no_passthrough): Make it static, add function comment. * regcache.h (regcache_dup, regcache_cpy): Reduce/update their comment. (regcache_cpy_no_passthrough): Remove declaration. --- gdb/regcache.c | 14 +++++++++++++- gdb/regcache.h | 9 ++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/gdb/regcache.c b/gdb/regcache.c index 366eba0..d363a12 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -391,6 +391,9 @@ do_cooked_read (void *src, int regnum, gdb_byte *buf) return regcache_cooked_read (regcache, regnum, buf); } +static void regcache_cpy_no_passthrough (struct regcache *dst, + struct regcache *src); + void regcache_cpy (struct regcache *dst, struct regcache *src) { @@ -407,7 +410,16 @@ regcache_cpy (struct regcache *dst, struct regcache *src) regcache_cpy_no_passthrough (dst, src); } -void +/* Copy/duplicate the contents of a register cache. By default, the + operation is pass-through. Writes to DST and reads from SRC will + go through to the target. See also regcache_cpy. + + It can not have overlapping SRC and DST buffers. + + It does not go through to the target. It only transfer values + already in the cache. */ + +static void regcache_cpy_no_passthrough (struct regcache *dst, struct regcache *src) { gdb_assert (src != NULL && dst != NULL); diff --git a/gdb/regcache.h b/gdb/regcache.h index 394506a..a9fb44b 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -224,17 +224,12 @@ extern void regcache_save (struct regcache *dst, /* Copy/duplicate the contents of a register cache. By default, the operation is pass-through. Writes to DST and reads from SRC will - go through to the target. + go through to the target. See also regcache_cpy_no_passthrough. - The ``cpy'' functions can not have overlapping SRC and DST buffers. - - ``no passthrough'' versions do not go through to the target. They - only transfer values already in the cache. */ + regcache_cpy can not have overlapping SRC and DST buffers. */ extern struct regcache *regcache_dup (struct regcache *regcache); extern void regcache_cpy (struct regcache *dest, struct regcache *src); -extern void regcache_cpy_no_passthrough (struct regcache *dest, - struct regcache *src); extern void registers_changed (void); extern void registers_changed_ptid (ptid_t);