* gdb.base/attach.exp (do_attach_tests): Don't forget to kill second
[deliverable/binutils-gdb.git] / gdb / ax-gdb.c
index 253636973d52fd6b290ee5ead73b6c75772b3cbb..dadad8e25491a157b977a392bbc82bf494c468b0 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,
@@ -133,7 +134,6 @@ static void gen_sizeof (union exp_element **pc,
 static void gen_expr (union exp_element **pc,
                      struct agent_expr *ax, struct axs_value *value);
 
-static void print_axs_value (struct ui_file *f, struct axs_value * value);
 static void agent_command (char *exp, int from_tty);
 \f
 
@@ -620,7 +620,12 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
 
     case LOC_COMPUTED:
     case LOC_COMPUTED_ARG:
-      (*SYMBOL_LOCATION_FUNCS (var)->tracepoint_var_ref) (var, ax, value);
+      /* FIXME: cagney/2004-01-26: It should be possible to
+        unconditionally call the SYMBOL_OPS method when available.
+        Unfortunately DWARF 2 stores the frame-base (instead of the
+        function) location in a function's symbol.  Oops!  For the
+        moment enable this when/where applicable.  */
+      SYMBOL_OPS (var)->tracepoint_var_ref (var, ax, value);
       break;
 
     case LOC_OPTIMIZED_OUT:
@@ -1595,7 +1600,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;
 
@@ -1796,33 +1801,6 @@ gen_trace_for_expr (CORE_ADDR scope, struct expression *expr)
   discard_cleanups (old_chain);
   return ax;
 }
-\f
-
-
-/* The "agent" command, for testing: compile and disassemble an expression.  */
-
-static void
-print_axs_value (struct ui_file *f, struct axs_value *value)
-{
-  switch (value->kind)
-    {
-    case axs_rvalue:
-      fputs_filtered ("rvalue", f);
-      break;
-
-    case axs_lvalue_memory:
-      fputs_filtered ("memory lvalue", f);
-      break;
-
-    case axs_lvalue_register:
-      fprintf_filtered (f, "register %d lvalue", value->u.reg);
-      break;
-    }
-
-  fputs_filtered (" : ", f);
-  type_print (value->type, "", f, -1);
-}
-
 
 static void
 agent_command (char *exp, int from_tty)
This page took 0.028236 seconds and 4 git commands to generate.