2003-04-12 Andrew Cagney <cagney@redhat.com>
[binutils-gdb.git] / gdb / ax-gdb.c
index e5f3048c0bf24877bfbd32b8d0ff4766c4e6d2e9..5692c35f99015cbd012fffab490048b34e10858a 100644 (file)
@@ -34,6 +34,7 @@
 #include "ax-gdb.h"
 #include "gdb_string.h"
 #include "block.h"
+#include "regcache.h"
 
 /* To make sense of this file, you should read doc/agentexpr.texi.
    Then look at the types and enums in ax-gdb.h.  For the code itself,
@@ -618,6 +619,11 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
       }
       break;
 
+    case LOC_COMPUTED:
+    case LOC_COMPUTED_ARG:
+      (*SYMBOL_LOCATION_FUNCS (var)->tracepoint_var_ref) (var, ax, value);
+      break;
+
     case LOC_OPTIMIZED_OUT:
       error ("The variable `%s' has been optimized out.",
             SYMBOL_PRINT_NAME (var));
@@ -1590,7 +1596,7 @@ gen_expr (union exp_element **pc, struct agent_expr *ax,
        (*pc) += 3;
        value->kind = axs_lvalue_register;
        value->u.reg = reg;
-       value->type = REGISTER_VIRTUAL_TYPE (reg);
+       value->type = register_type (current_gdbarch, reg);
       }
       break;