]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add frame info check to DW_OP_reg operations
authorZoran Zaric <Zoran.Zaric@amd.com>
Wed, 14 Oct 2020 09:44:56 +0000 (10:44 +0100)
committerZoran Zaric <zoran.zaric@amd.com>
Fri, 5 Nov 2021 11:46:38 +0000 (11:46 +0000)
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

index 15164babdd64445377c8c8083d77647e5800c3d1..2555f9969efb04789f18f628fdf0f5a618720f05 100644 (file)
@@ -3296,6 +3296,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)