Replace the block_found global with explicit data-flow
[deliverable/binutils-gdb.git] / gdb / parse.c
index 6b59c4f7684a077409bfe73c99bb5b1601e0f37e..75b7cfac1f235914b78f9f30da30a4273830ddae 100644 (file)
@@ -615,7 +615,7 @@ mark_completion_tag (enum type_code tag, const char *ptr, int length)
 void
 write_dollar_variable (struct parser_state *ps, struct stoken str)
 {
-  struct symbol *sym = NULL;
+  struct block_symbol sym;
   struct bound_minimal_symbol msym;
   struct internalvar *isym = NULL;
 
@@ -672,11 +672,11 @@ write_dollar_variable (struct parser_state *ps, struct stoken str)
 
   sym = lookup_symbol (copy_name (str), (struct block *) NULL,
                       VAR_DOMAIN, NULL);
-  if (sym)
+  if (sym.symbol)
     {
       write_exp_elt_opcode (ps, OP_VAR_VALUE);
-      write_exp_elt_block (ps, block_found);   /* set by lookup_symbol */
-      write_exp_elt_sym (ps, sym);
+      write_exp_elt_block (ps, sym.block);
+      write_exp_elt_sym (ps, sym.symbol);
       write_exp_elt_opcode (ps, OP_VAR_VALUE);
       return;
     }
This page took 0.024967 seconds and 4 git commands to generate.