From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 08/13] Eliminate UNOP_MEMVAL_TLS
Date: Thu, 13 Jul 2017 02:19:00 -0000 [thread overview]
Message-ID: <1499912370-1842-9-git-send-email-palves@redhat.com> (raw)
In-Reply-To: <1499912370-1842-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 <palves@redhat.com>
* 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)
--
2.5.5
next prev parent reply other threads:[~2017-07-13 2:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 2:19 [PATCH 00/13] No-debug-info debugging improvements Pedro Alves
2017-07-13 2:19 ` [PATCH 01/13] Stop assuming no-debug-info functions return int Pedro Alves
2017-07-13 2:19 ` [PATCH 03/13] Make ptype/whatis print function name of functions with no debug info too Pedro Alves
2017-07-13 2:19 ` [PATCH 02/13] Introduce OP_VAR_MSYM_VALUE Pedro Alves
2017-07-13 2:19 ` [PATCH 04/13] evaluate_subexp_standard: Eliminate one goto Pedro Alves
2017-07-13 2:19 ` [PATCH 07/13] Stop assuming no-debug-info variables have type int Pedro Alves
2017-07-13 2:19 ` Pedro Alves [this message]
2017-07-13 2:27 ` [PATCH 06/13] evaluate_subexp_standard: Factor out OP_VAR_VALUE handling Pedro Alves
2017-07-13 2:27 ` [PATCH 09/13] Handle "p S::method()::static_var" in the C++ parser Pedro Alves
2017-07-13 2:28 ` [PATCH 12/13] Document "no debug info debugging" improvements Pedro Alves
2017-07-13 11:09 ` [PATCH 13/13] " Pedro Alves
2017-07-13 13:51 ` Pedro Alves
2017-07-13 13:54 ` Pedro Alves
2017-07-13 15:33 ` Pedro Alves
2017-07-13 15:47 ` [PATCH 12/13] " Eli Zaretskii
2017-07-13 16:14 ` Pedro Alves
2017-07-13 2:28 ` [PATCH 11/13] Make "p S::method() const::static_var" work too Pedro Alves
2017-07-13 2:28 ` [PATCH 05/13] evaluate_subexp_standard: Remove useless assignments Pedro Alves
2017-07-13 2:29 ` [PATCH 12/13] Fix calling prototyped functions via function pointers Pedro Alves
2017-07-13 2:29 ` [PATCH 10/13] Handle "p 'S::method()::static_var'" (quoted) in symbol lookup Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1499912370-1842-9-git-send-email-palves@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).