gdb: Make use of 'add_info' to create info sub-commands.
[deliverable/binutils-gdb.git] / gdb / jv-exp.y
index 49998487eb8dd58cc01cd1406eba3596ef779a39..8edd94e0e0ca71a46fb1900340bced78bf320899 100644 (file)
@@ -355,7 +355,7 @@ QualifiedName:
                    {
                      char *buf;
 
-                     buf = malloc ($$.length + 1);
+                     buf = (char *) malloc ($$.length + 1);
                      make_cleanup (free, buf);
                      sprintf (buf, "%.*s.%.*s",
                               $1.length, $1.ptr, $3.length, $3.ptr);
@@ -1284,9 +1284,7 @@ push_variable (struct parser_state *par_state, struct stoken name)
        }
 
       write_exp_elt_opcode (par_state, 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 (par_state, NULL);
+      write_exp_elt_block (par_state, sym.block);
       write_exp_elt_sym (par_state, sym.symbol);
       write_exp_elt_opcode (par_state, OP_VAR_VALUE);
       return 1;
This page took 0.02341 seconds and 4 git commands to generate.