crash printing non-local variable from nested subprogram
[deliverable/binutils-gdb.git] / gdb / p-exp.y
index 191b3d37f276e989e7c4e24a72ff3e2324511aa4..c255a57d0b6a175405a45278bac1a8b09a5c29cb 100644 (file)
@@ -772,10 +772,7 @@ variable:  name_not_typename
                                }
 
                              write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-                             /* We want to use the selected frame, not
-                                another more inner frame which happens to
-                                be in the same block.  */
-                             write_exp_elt_block (pstate, NULL);
+                             write_exp_elt_block (pstate, sym.block);
                              write_exp_elt_sym (pstate, sym.symbol);
                              write_exp_elt_opcode (pstate, OP_VAR_VALUE);
                              current_type = sym.symbol->type; }
This page took 0.024334 seconds and 4 git commands to generate.