aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2/expr.c')
-rw-r--r--gdb/dwarf2/expr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c
index cc1a72d..85088e9 100644
--- a/gdb/dwarf2/expr.c
+++ b/gdb/dwarf2/expr.c
@@ -2338,7 +2338,9 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
case DW_OP_push_object_address:
/* Return the address of the object we are currently observing. */
- if (this->m_addr_info == nullptr)
+ if (this->m_addr_info == nullptr
+ || (this->m_addr_info->valaddr.data () == nullptr
+ && this->m_addr_info->addr == 0))
error (_("Location address is not set."));
result_val