[PATCH v3 21/28] Add frame info check to DW_OP_reg operations
Zoran Zaric
zoran.zaric@amd.com
Thu Oct 14 09:32:28 GMT 2021
From: Zoran Zaric <Zoran.Zaric@amd.com>
After enabling location description to be on a DWARF stack, it is now
needed to check the frame context information validity when creating a
register location description.
gdb/ChangeLog:
* dwarf2/expr.c (dwarf_expr_context::execute_stack_op): Add
check_frame_info call for DW_OP_reg operations.
---
gdb/dwarf2/expr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c
index 5bec805a8fb..602a5186cfa 100644
--- a/gdb/dwarf2/expr.c
+++ b/gdb/dwarf2/expr.c
@@ -3270,6 +3270,7 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr,
case DW_OP_reg31:
case DW_OP_regx:
{
+ ensure_have_frame (this->m_frame, "DW_OP_reg");
ULONGEST result;
if (op == DW_OP_regx)
--
2.17.1
More information about the Gdb-patches
mailing list