use remote-utils facilities for baud_rate
[deliverable/binutils-gdb.git] / gdb / m2-exp.y
index 449b13f4bb126e871fa2a1943976834460a945b0..13b93a0f0df5bca2bea99e13444387e1c749293a 100644 (file)
@@ -67,8 +67,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define        yypgo   m2_pgo
 #define        yyact   m2_act
 #define        yyexca  m2_exca
-#define yyerrflag m2_errflag
-#define yynerrs        m2_nerrs
+#define        yyerrflag m2_errflag
+#define        yynerrs m2_nerrs
 #define        yyps    m2_ps
 #define        yypv    m2_pv
 #define        yys     m2_s
@@ -79,8 +79,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define        yy_yyv  m2_yyv
 #define        yyval   m2_val
 #define        yylloc  m2_lloc
-#define yyreds m2_reds         /* With YYDEBUG defined */
-#define yytoks m2_toks         /* With YYDEBUG defined */
+#define        yyreds  m2_reds         /* With YYDEBUG defined */
+#define        yytoks  m2_toks         /* With YYDEBUG defined */
 
 #ifndef YYDEBUG
 #define        YYDEBUG 0               /* Default to no yydebug support */
@@ -559,6 +559,7 @@ fblock      :       block COLONCOLON BLOCKNAME
 /* 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); }
        ;
@@ -580,6 +581,8 @@ variable:   block COLONCOLON NAME
                                   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); }
        ;
@@ -603,7 +606,10 @@ variable:  NAME
                                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))
@@ -623,6 +629,10 @@ variable:  NAME
                                  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);
                            }
@@ -1110,10 +1120,14 @@ yylex ()
        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:
This page took 0.024801 seconds and 4 git commands to generate.