From patchwork Thu Jul 13 15:32:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 21595 Received: (qmail 112036 invoked by alias); 13 Jul 2017 15:32:24 -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 111968 invoked by uid 89); 13 Jul 2017 15:32:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 ESMTP; Thu, 13 Jul 2017 15:32:20 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8F05D7CE12 for ; Thu, 13 Jul 2017 15:32:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8F05D7CE12 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8F05D7CE12 Received: from cascais.lan (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 077A867CF7 for ; Thu, 13 Jul 2017 15:32:18 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH v2 09/13] Eliminate UNOP_MEMVAL_TLS Date: Thu, 13 Jul 2017 16:32:05 +0100 Message-Id: <1499959929-29497-10-git-send-email-palves@redhat.com> In-Reply-To: <1499959929-29497-1-git-send-email-palves@redhat.com> References: <1499959929-29497-1-git-send-email-palves@redhat.com> Since minsym references now go via OP_VAR_MSYM_VALUE, UNOP_MEMVAL_TLS is no longer used anywhere. gdb/ChangeLog: yyyy-mm-dd Pedro Alves * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS handling. * expprint.c (print_subexp_standard, dump_subexp_body_standard): Ditto. * parse.c (operator_length_standard, operator_check_standard): Ditto. * std-operator.def (UNOP_MEMVAL_TLS): Delete. --- gdb/eval.c | 16 ---------------- gdb/expprint.c | 22 ---------------------- gdb/parse.c | 10 ---------- gdb/std-operator.def | 7 ------- 4 files changed, 55 deletions(-) diff --git a/gdb/eval.c b/gdb/eval.c index 75d3c86..e70328b 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -2655,22 +2655,6 @@ evaluate_subexp_standard (struct type *expect_type, else return value_at_lazy (type, value_as_address (arg1)); - case UNOP_MEMVAL_TLS: - (*pos) += 3; - arg1 = evaluate_subexp (expect_type, exp, pos, noside); - if (noside == EVAL_SKIP) - return eval_skip_value (exp); - if (noside == EVAL_AVOID_SIDE_EFFECTS) - return value_zero (exp->elts[pc + 2].type, lval_memory); - else - { - CORE_ADDR tls_addr; - - tls_addr = target_translate_tls_address (exp->elts[pc + 1].objfile, - value_as_address (arg1)); - return value_at_lazy (exp->elts[pc + 2].type, tls_addr); - } - case UNOP_PREINCREMENT: arg1 = evaluate_subexp (expect_type, exp, pos, noside); if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS) diff --git a/gdb/expprint.c b/gdb/expprint.c index 4939c01..0697a77 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -478,18 +478,6 @@ print_subexp_standard (struct expression *exp, int *pos, fputs_filtered (")", stream); return; - case UNOP_MEMVAL_TLS: - (*pos) += 3; - if ((int) prec > (int) PREC_PREFIX) - fputs_filtered ("(", stream); - fputs_filtered ("{", stream); - type_print (exp->elts[pc + 2].type, "", stream, 0); - fputs_filtered ("} ", stream); - print_subexp (exp, pos, stream, PREC_PREFIX); - if ((int) prec > (int) PREC_PREFIX) - fputs_filtered (")", stream); - return; - case BINOP_ASSIGN_MODIFY: opcode = exp->elts[pc + 1].opcode; (*pos) += 2; @@ -961,16 +949,6 @@ dump_subexp_body_standard (struct expression *exp, fprintf_filtered (stream, ")"); elt = dump_subexp (exp, stream, elt + 2); break; - case UNOP_MEMVAL_TLS: - fprintf_filtered (stream, "TLS type @"); - gdb_print_host_address (exp->elts[elt + 1].type, stream); - fprintf_filtered (stream, " (__thread /* \"%s\" */ ", - (exp->elts[elt].objfile == NULL ? "(null)" - : objfile_name (exp->elts[elt].objfile))); - type_print (exp->elts[elt + 1].type, NULL, stream, 0); - fprintf_filtered (stream, ")"); - elt = dump_subexp (exp, stream, elt + 3); - break; case OP_TYPE: fprintf_filtered (stream, "Type @"); gdb_print_host_address (exp->elts[elt].type, stream); diff --git a/gdb/parse.c b/gdb/parse.c index 4889c1a..ee6b6f7 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -949,11 +949,6 @@ operator_length_standard (const struct expression *expr, int endpos, args = 1; break; - case UNOP_MEMVAL_TLS: - oplen = 4; - args = 1; - break; - case UNOP_ABS: case UNOP_CAP: case UNOP_CHR: @@ -1837,11 +1832,6 @@ operator_check_standard (struct expression *exp, int pos, } break; - case UNOP_MEMVAL_TLS: - objfile = elts[pos + 1].objfile; - type = elts[pos + 2].type; - break; - case OP_VAR_VALUE: { const struct block *const block = elts[pos + 1].block; diff --git a/gdb/std-operator.def b/gdb/std-operator.def index 9007dd4..3eed2cc 100644 --- a/gdb/std-operator.def +++ b/gdb/std-operator.def @@ -218,13 +218,6 @@ OP (UNOP_REINTERPRET_CAST) following subexpression. */ OP (UNOP_MEMVAL) -/* UNOP_MEMVAL_TLS is followed by a `struct objfile' pointer in the next - exp_element and a type pointer in the following exp_element. - With another UNOP_MEMVAL_TLS at the end, this makes four exp_elements. - It casts the contents of the word offsetted by the value of the - following subexpression from the TLS specified by `struct objfile'. */ -OP (UNOP_MEMVAL_TLS) - /* Like UNOP_MEMVAL, but the type is supplied as a subexpression. */ OP (UNOP_MEMVAL_TYPE)