diff options
Diffstat (limited to 'gdb/eval.c')
-rw-r--r-- | gdb/eval.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/eval.c b/gdb/eval.c index d5d8969a7be..e1076e1efd4 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -2019,6 +2019,21 @@ evaluate_subexp_standard (struct type *expect_type, return value_at_lazy (exp->elts[pc + 1].type, value_as_address (arg1)); + case UNOP_MEMVAL_TLS: + (*pos) += 3; + arg1 = evaluate_subexp (expect_type, exp, pos, noside); + if (noside == EVAL_SKIP) + goto nosideret; + 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) |