ODR warnings for "struct coff_symbol"
[binutils-gdb.git] / gdb / ax-gdb.c
index be2063f236669ed22571f89364129f2b60c9d7a6..f8ea8adc6266bd2cc1d3992bc3817536941f2b68 100644 (file)
@@ -499,7 +499,7 @@ gen_offset (struct agent_expr *ax, int offset)
 static void
 gen_sym_offset (struct agent_expr *ax, struct symbol *var)
 {
-  gen_offset (ax, SYMBOL_VALUE (var));
+  gen_offset (ax, var->value_longest ());
 }
 
 
@@ -523,12 +523,12 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
   switch (var->aclass ())
     {
     case LOC_CONST:            /* A constant, like an enum value.  */
-      ax_const_l (ax, (LONGEST) SYMBOL_VALUE (var));
+      ax_const_l (ax, (LONGEST) var->value_longest ());
       value->kind = axs_rvalue;
       break;
 
     case LOC_LABEL:            /* A goto label, being used as a value.  */
-      ax_const_l (ax, (LONGEST) SYMBOL_VALUE_ADDRESS (var));
+      ax_const_l (ax, (LONGEST) var->value_address ());
       value->kind = axs_rvalue;
       break;
 
@@ -540,7 +540,7 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
       /* Variable at a fixed location in memory.  Easy.  */
     case LOC_STATIC:
       /* Push the address of the variable.  */
-      ax_const_l (ax, SYMBOL_VALUE_ADDRESS (var));
+      ax_const_l (ax, var->value_address ());
       value->kind = axs_lvalue_memory;
       break;
 
@@ -571,7 +571,7 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
       break;
 
     case LOC_BLOCK:
-      ax_const_l (ax, BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (var)));
+      ax_const_l (ax, var->value_block ()->entry_pc ());
       value->kind = axs_rvalue;
       break;
 
@@ -603,7 +603,7 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
          error (_("Couldn't resolve symbol `%s'."), var->print_name ());
 
        /* Push the address of the variable.  */
-       ax_const_l (ax, BMSYMBOL_VALUE_ADDRESS (msym));
+       ax_const_l (ax, msym.value_address ());
        value->kind = axs_lvalue_memory;
       }
       break;