Handle DW_TAG_variant_part and DW_TAG_variant
[deliverable/binutils-gdb.git] / gdb / m2-exp.y
index 3998d2b9f99b0d6b4c521e0673bbd1ed75a1477d..2cf026c77a5c8c257e102af418d005cc8013f2f7 100644 (file)
@@ -1,5 +1,5 @@
 /* YACC grammar for Modula-2 expressions, for GDB.
-   Copyright (C) 1986-2017 Free Software Foundation, Inc.
+   Copyright (C) 1986-2018 Free Software Foundation, Inc.
    Generated from expread.y (now c-exp.y) and contributed by the Department
    of Computer Science at the State University of New York at Buffalo, 1991.
 
@@ -548,12 +548,7 @@ variable:  block COLONCOLON NAME
                            error (_("No symbol \"%s\" in specified context."),
                                   copy_name ($3));
                          if (symbol_read_needs_frame (sym.symbol))
-                           {
-                             if (innermost_block == 0
-                                 || contained_in (sym.block,
-                                                  innermost_block))
-                               innermost_block = sym.block;
-                           }
+                           innermost_block.update (sym);
 
                          write_exp_elt_opcode (pstate, OP_VAR_VALUE);
                          write_exp_elt_block (pstate, sym.block);
@@ -574,12 +569,7 @@ variable:  NAME
                          if (sym.symbol)
                            {
                              if (symbol_read_needs_frame (sym.symbol))
-                               {
-                                 if (innermost_block == 0 ||
-                                     contained_in (sym.block,
-                                                   innermost_block))
-                                   innermost_block = sym.block;
-                               }
+                               innermost_block.update (sym);
 
                              write_exp_elt_opcode (pstate, OP_VAR_VALUE);
                              write_exp_elt_block (pstate, sym.block);
This page took 0.024856 seconds and 4 git commands to generate.