aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-09-04 20:21:15 +0100
committerPedro Alves <palves@redhat.com>2017-09-04 20:21:15 +0100
commitdd5901a6a5bba75f3dee49f9a27640eedad90afe (patch)
tree75d71fc55a8fc446a59254f6991e58c6780a7033 /gdb
parent46a4882b3c7d9ec981568b8b13a3c9c39c8f8e61 (diff)
downloadgdb-dd5901a6a5bba75f3dee49f9a27640eedad90afe.zip
gdb-dd5901a6a5bba75f3dee49f9a27640eedad90afe.tar.gz
gdb-dd5901a6a5bba75f3dee49f9a27640eedad90afe.tar.bz2
Eliminate UNOP_MEMVAL_TLS
Since minsym references now go via OP_VAR_MSYM_VALUE, UNOP_MEMVAL_TLS is no longer used anywhere. gdb/ChangeLog: 2017-09-04 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/eval.c16
-rw-r--r--gdb/expprint.c22
-rw-r--r--gdb/parse.c10
-rw-r--r--gdb/std-operator.def7
5 files changed, 10 insertions, 55 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4e08489..cc6f76d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
2017-09-04 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.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
* ax-gdb.c: Include "typeprint.h".
(gen_expr_for_cast): New function.
(gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
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 83bfa4b..3db9735 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -950,11 +950,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:
@@ -1833,11 +1828,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)