* breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
[deliverable/binutils-gdb.git] / gdb / c-exp.y
index b841498275b6412c2e36c0773ea8b97df418e773..1ab991c14c205ba060400c68bc82fc8e8117ffa0 100644 (file)
@@ -564,6 +564,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); }
        ;
@@ -620,6 +622,7 @@ variable:   qualified_name
                          if (sym)
                            {
                              write_exp_elt_opcode (OP_VAR_VALUE);
+                             write_exp_elt_block (NULL);
                              write_exp_elt_sym (sym);
                              write_exp_elt_opcode (OP_VAR_VALUE);
                              break;
@@ -630,7 +633,7 @@ variable:   qualified_name
                          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);
@@ -662,8 +665,11 @@ variable:  name_not_typename
                                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:
                                  if (innermost_block == 0 ||
                                      contained_in (block_found, 
                                                    innermost_block))
@@ -689,6 +695,10 @@ variable:  name_not_typename
                                  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);
                            }
@@ -716,7 +726,7 @@ variable:   name_not_typename
                              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);
@@ -961,7 +971,7 @@ parse_number (p, len, parsed_float, putithere)
 {
   register LONGEST n = 0;
   register LONGEST prevn = 0;
-  register int i;
+  register int i = 0;
   register int c;
   register int base = input_radix;
   int unsigned_p = 0;
This page took 0.023902 seconds and 4 git commands to generate.