From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6693 invoked by alias); 10 Aug 2012 09:13:15 -0000 Received: (qmail 6651 invoked by uid 22791); 10 Aug 2012 09:13:13 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_CP X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Aug 2012 09:12:54 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1SzlH3-0007ei-NE from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Fri, 10 Aug 2012 02:12:53 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 10 Aug 2012 02:12:53 -0700 Received: from qiyao.dyndns.org.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Fri, 10 Aug 2012 02:12:52 -0700 From: Yao Qi To: Subject: [PATCH 1/3] Remove OP_BITSTRING Date: Fri, 10 Aug 2012 09:13:00 -0000 Message-ID: <1344589936-2006-2-git-send-email-yao@codesourcery.com> In-Reply-To: <1344589936-2006-1-git-send-email-yao@codesourcery.com> References: <1344589936-2006-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes 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 X-SW-Source: 2012-08/txt/msg00309.txt.bz2 gdb: 2012-08-10 Yao Qi * std-operator.def: Remove OP_BITSTRING. * breakpoint.c (watchpoint_exp_is_const): Update. * eval.c (evaluate_subexp_standard): Remove handling to OP_BITSTRING. * expprint.c (print_subexp_standard): Likewise. (dump_subexp_body_standard): Likewise. * parse.c (operator_length_standard): Likewise. * valops.c (value_bitstring): Remove. * value.h: Remove the declaration of 'value_bitstring'. --- gdb/breakpoint.c | 1 - gdb/eval.c | 10 ---------- gdb/expprint.c | 8 -------- gdb/parse.c | 6 ------ gdb/std-operator.def | 6 ------ gdb/valops.c | 13 ------------- gdb/value.h | 2 -- 7 files changed, 0 insertions(+), 46 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index e38c54a..1ba923f 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -10168,7 +10168,6 @@ watchpoint_exp_is_const (const struct expression *exp) case OP_LAST: case OP_COMPLEX: case OP_STRING: - case OP_BITSTRING: case OP_ARRAY: case OP_TYPE: case OP_TYPEOF: diff --git a/gdb/eval.c b/gdb/eval.c index 4295845..9bf5401 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -970,16 +970,6 @@ evaluate_subexp_standard (struct type *expect_type, } return value_nsstring (exp->gdbarch, &exp->elts[pc + 2].string, tem + 1); - case OP_BITSTRING: - tem = longest_to_int (exp->elts[pc + 1].longconst); - (*pos) - += 3 + BYTES_TO_EXP_ELEM ((tem + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT); - if (noside == EVAL_SKIP) - goto nosideret; - return value_bitstring (&exp->elts[pc + 2].string, tem, - builtin_type (exp->gdbarch)->builtin_int); - break; - case OP_ARRAY: (*pos) += 3; tem2 = longest_to_int (exp->elts[pc + 1].longconst); diff --git a/gdb/expprint.c b/gdb/expprint.c index 779368b..c74c564 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -210,13 +210,6 @@ print_subexp_standard (struct expression *exp, int *pos, } return; - case OP_BITSTRING: - nargs = longest_to_int (exp->elts[pc + 1].longconst); - (*pos) - += 3 + BYTES_TO_EXP_ELEM ((nargs + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT); - fprintf_unfiltered (stream, "B''"); - return; - case OP_OBJC_NSSTRING: /* Objective-C Foundation Class NSString constant. */ { @@ -1037,7 +1030,6 @@ dump_subexp_body_standard (struct expression *exp, case OP_F77_UNDETERMINED_ARGLIST: case OP_COMPLEX: case OP_STRING: - case OP_BITSTRING: case OP_BOOL: case OP_M2_STRING: case OP_THIS: diff --git a/gdb/parse.c b/gdb/parse.c index d1ed4e8..d418aef 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -967,12 +967,6 @@ operator_length_standard (const struct expression *expr, int endpos, oplen = 4 + BYTES_TO_EXP_ELEM (oplen + 1); break; - case OP_BITSTRING: - oplen = longest_to_int (expr->elts[endpos - 2].longconst); - oplen = (oplen + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; - oplen = 4 + BYTES_TO_EXP_ELEM (oplen); - break; - case OP_ARRAY: oplen = 4; args = longest_to_int (expr->elts[endpos - 2].longconst); diff --git a/gdb/std-operator.def b/gdb/std-operator.def index b013687..173dc1d 100644 --- a/gdb/std-operator.def +++ b/gdb/std-operator.def @@ -194,12 +194,6 @@ OP (OP_COMPLEX) is executed. */ OP (OP_STRING) -/* OP_BITSTRING represents a packed bitstring constant. - Its format is the same as that of a STRUCTOP, but the bitstring - data is just made into a bitstring constant when the operation - is executed. */ -OP (OP_BITSTRING) - /* OP_ARRAY creates an array constant out of the following subexpressions. It is followed by two exp_elements, the first containing an integer that is the lower bound of the array and the second containing another diff --git a/gdb/valops.c b/gdb/valops.c index 934f381..8167cd4 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1875,19 +1875,6 @@ value_string (char *ptr, int len, struct type *char_type) return val; } -struct value * -value_bitstring (char *ptr, int len, struct type *index_type) -{ - struct value *val; - struct type *domain_type - = create_range_type (NULL, index_type, 0, len - 1); - struct type *type = create_set_type (NULL, domain_type); - - TYPE_CODE (type) = TYPE_CODE_BITSTRING; - val = allocate_value (type); - memcpy (value_contents_raw (val), ptr, TYPE_LENGTH (type)); - return val; -} /* See if we can pass arguments in T2 to a function which takes arguments of types T1. T1 is a list of NARGS arguments, and T2 is diff --git a/gdb/value.h b/gdb/value.h index d8b157f..cfdf085 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -591,8 +591,6 @@ extern struct value *value_cstring (char *ptr, int len, struct type *char_type); extern struct value *value_string (char *ptr, int len, struct type *char_type); -extern struct value *value_bitstring (char *ptr, int len, - struct type *index_type); extern struct value *value_array (int lowbound, int highbound, struct value **elemvec); -- 1.7.7.6