#define yyerror m2_error
#define yylval m2_lval
#define yychar m2_char
-#define yycheck m2_yycheck
#define yydebug m2_debug
-#define yydefred m2_yydefred
-#define yydgoto m2_yydgoto
-#define yygindex m2_yygindex
-#define yylen m2_yylen
-#define yylhs m2_yylhs
-#define yyrindex m2_yyrindex
-#define yysccsid m2_yysccsid
-#define yysindex m2_yysindex
#define yypact m2_pact
#define yyr1 m2_r1
#define yyr2 m2_r2
#define yyps m2_ps
#define yypv m2_pv
#define yys m2_s
-#define yyss m2_yyss
-#define yyssp m2_yyssp
#define yy_yys m2_yys
#define yystate m2_state
-#define yytable m2_yytable
#define yytmp m2_tmp
#define yyv m2_v
-#define yyvs m2_vs
-#define yyvss m2_vss
#define yy_yyv m2_yyv
#define yyval m2_val
#define yylloc m2_lloc
/* Useful for assigning to PROCEDURE variables */
variable: fblock
{ write_exp_elt_opcode(OP_VAR_VALUE);
+ write_exp_elt_block (NULL);
write_exp_elt_sym ($1);
write_exp_elt_opcode (OP_VAR_VALUE); }
;
copy_name ($3));
write_exp_elt_opcode (OP_VAR_VALUE);
+ /* block_found is set by lookup_symbol. */
+ write_exp_elt_block (block_found);
write_exp_elt_sym (sym);
write_exp_elt_opcode (OP_VAR_VALUE); }
;
case LOC_LOCAL:
case LOC_REF_ARG:
case LOC_REGPARM:
+ case LOC_REGPARM_ADDR:
case LOC_LOCAL_ARG:
+ case LOC_BASEREG:
+ case LOC_BASEREG_ARG:
if (innermost_block == 0 ||
contained_in (block_found,
innermost_block))
break;
}
write_exp_elt_opcode (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 (NULL);
write_exp_elt_sym (sym);
write_exp_elt_opcode (OP_VAR_VALUE);
}
if (msymbol != NULL)
{
write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_int);
+ write_exp_elt_type (builtin_type_long);
write_exp_elt_longcst ((LONGEST) SYMBOL_VALUE_ADDRESS (msymbol));
write_exp_elt_opcode (OP_LONG);
write_exp_elt_opcode (UNOP_MEMVAL);
case LOC_ARG:
case LOC_REF_ARG:
case LOC_REGPARM:
+ case LOC_REGPARM_ADDR:
case LOC_LOCAL:
case LOC_LOCAL_ARG:
+ case LOC_BASEREG:
+ case LOC_BASEREG_ARG:
case LOC_CONST:
case LOC_CONST_BYTES:
+ case LOC_OPTIMIZED_OUT:
return NAME;
case LOC_TYPEDEF: