aboutsummaryrefslogtreecommitdiff
path: root/gdb/expop.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/expop.h')
-rw-r--r--gdb/expop.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/expop.h b/gdb/expop.h
index b81e228..1967d97 100644
--- a/gdb/expop.h
+++ b/gdb/expop.h
@@ -1513,9 +1513,11 @@ public:
struct expression *exp,
enum noside noside) override
{
- if (expect_type != nullptr && expect_type->code () == TYPE_CODE_PTR)
- expect_type = check_typedef (expect_type)->target_type ();
- value *val = std::get<0> (m_storage)->evaluate (expect_type, exp, noside);
+ struct type *pointer_to_expect_type = (expect_type != nullptr
+ ? lookup_pointer_type (expect_type)
+ : nullptr);
+ value *val
+ = std::get<0> (m_storage)->evaluate (pointer_to_expect_type, exp, noside);
return eval_op_ind (expect_type, exp, noside, val);
}