aboutsummaryrefslogtreecommitdiff
path: root/gdb/ax-gdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ax-gdb.c')
-rw-r--r--gdb/ax-gdb.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index e0970e8..bdf4a6d 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -2673,6 +2673,26 @@ unop_cast_type_operation::do_generate_ax (struct expression *exp,
std::get<1> (m_storage)->generate_ax (exp, ax, value, value_type (val));
}
+void
+var_value_operation::do_generate_ax (struct expression *exp,
+ struct agent_expr *ax,
+ struct axs_value *value,
+ struct type *cast_type)
+{
+ gen_var_ref (ax, value, std::get<0> (m_storage));
+
+ if (value->optimized_out)
+ error (_("`%s' has been optimized out, cannot use"),
+ std::get<0> (m_storage)->print_name ());
+
+ if (value->type->code () == TYPE_CODE_ERROR)
+ {
+ if (cast_type == nullptr)
+ error_unknown_type (std::get<0> (m_storage)->print_name ());
+ value->type = cast_type;
+ }
+}
+
}
/* This handles the middle-to-right-side of code generation for binary