From patchwork Mon Jul 14 17:52:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 2052 Received: (qmail 30752 invoked by alias); 14 Jul 2014 17:52:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 30723 invoked by uid 89); 14 Jul 2014 17:52:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS 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; Mon, 14 Jul 2014 17:52:16 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6EHqEpK006982 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 14 Jul 2014 13:52:14 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6EHqDiA017102 for ; Mon, 14 Jul 2014 13:52:14 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PUSHED OB/PATCH] Garbage collect value_contents_equal Date: Mon, 14 Jul 2014 18:52:13 +0100 Message-Id: <1405360333-24295-1-git-send-email-palves@redhat.com> Hasn't been used in years. gdb/ 2014-07-14 Pedro Alves * value.c (value_contents_equal): Delete function. * value.h (value_contents_equal): Delete declaration. --- gdb/ChangeLog | 5 +++++ gdb/value.c | 19 ------------------- gdb/value.h | 1 - 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6d4d2b9..dd4b2eb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-07-14 Pedro Alves + + * value.c (value_contents_equal): Delete function. + * value.h (value_contents_equal): Delete declaration. + 2014-07-14 Tom Tromey PR exp/17106: diff --git a/gdb/value.c b/gdb/value.c index 557056f..29abe5f 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -1210,25 +1210,6 @@ value_contents_writeable (struct value *value) return value_contents_raw (value); } -/* Return non-zero if VAL1 and VAL2 have the same contents. Note that - this function is different from value_equal; in C the operator == - can return 0 even if the two values being compared are equal. */ - -int -value_contents_equal (struct value *val1, struct value *val2) -{ - struct type *type1; - struct type *type2; - - type1 = check_typedef (value_type (val1)); - type2 = check_typedef (value_type (val2)); - if (TYPE_LENGTH (type1) != TYPE_LENGTH (type2)) - return 0; - - return (memcmp (value_contents (val1), value_contents (val2), - TYPE_LENGTH (type1)) == 0); -} - int value_optimized_out (struct value *value) { diff --git a/gdb/value.h b/gdb/value.h index c2e9faf..86ebd70 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -322,7 +322,6 @@ extern const gdb_byte * value_contents_for_printing_const (const struct value *value); extern int value_fetch_lazy (struct value *val); -extern int value_contents_equal (struct value *val1, struct value *val2); /* If nonzero, this is the value of a variable which does not actually exist in the program, at least partially. If the value is lazy,