OSDN Git Service

* ax-gdb.c (expr_to_agent): Delete unused function.
authorJim Blandy <jimb@codesourcery.com>
Fri, 26 Oct 2007 23:42:28 +0000 (23:42 +0000)
committerJim Blandy <jimb@codesourcery.com>
Fri, 26 Oct 2007 23:42:28 +0000 (23:42 +0000)
(expr_to_address_and_size): Delete #if 0'd function.
* ax-gdb.h (expr_to_agent): Delete declaration.

gdb/ChangeLog
gdb/ax-gdb.c
gdb/ax-gdb.h

index 3d5f5f9..f30265a 100644 (file)
@@ -1,5 +1,9 @@
 2007-10-26  Jim Blandy  <jimb@codesourcery.com>
 
+       * ax-gdb.c (expr_to_agent): Delete unused function.
+       (expr_to_address_and_size): Delete #if 0'd function.
+       * ax-gdb.h (expr_to_agent): Delete declaration.
+
        * ax-gdb.c (gen_cast): Remove redundant assignment to
        value->type.  Doc fix.
 
index 013b898..2a4201a 100644 (file)
@@ -1736,56 +1736,6 @@ gen_expr (union exp_element **pc, struct agent_expr *ax,
 
 /* Generating bytecode from GDB expressions: driver */
 
-/* Given a GDB expression EXPR, produce a string of agent bytecode
-   which computes its value.  Return the agent expression, and set
-   *VALUE to describe its type, and whether it's an lvalue or rvalue.  */
-struct agent_expr *
-expr_to_agent (struct expression *expr, struct axs_value *value)
-{
-  struct cleanup *old_chain = 0;
-  struct agent_expr *ax = new_agent_expr (0);
-  union exp_element *pc;
-
-  old_chain = make_cleanup_free_agent_expr (ax);
-
-  pc = expr->elts;
-  trace_kludge = 0;
-  gen_expr (&pc, ax, value);
-
-  /* We have successfully built the agent expr, so cancel the cleanup
-     request.  If we add more cleanups that we always want done, this
-     will have to get more complicated.  */
-  discard_cleanups (old_chain);
-  return ax;
-}
-
-
-#if 0                          /* not used */
-/* Given a GDB expression EXPR denoting an lvalue in memory, produce a
-   string of agent bytecode which will leave its address and size on
-   the top of stack.  Return the agent expression.
-
-   Not sure this function is useful at all.  */
-struct agent_expr *
-expr_to_address_and_size (struct expression *expr)
-{
-  struct axs_value value;
-  struct agent_expr *ax = expr_to_agent (expr, &value);
-
-  /* Complain if the result is not a memory lvalue.  */
-  if (value.kind != axs_lvalue_memory)
-    {
-      free_agent_expr (ax);
-      error (_("Expression does not denote an object in memory."));
-    }
-
-  /* Push the object's size on the stack.  */
-  ax_const_l (ax, TYPE_LENGTH (value.type));
-
-  return ax;
-}
-#endif
-
 /* Given a GDB expression EXPR, return bytecode to trace its value.
    The result will use the `trace' and `trace_quick' bytecodes to
    record the value of all memory touched by the expression.  The
index 9e711ba..c34959c 100644 (file)
@@ -91,11 +91,6 @@ struct axs_value
 
 /* Translating GDB expressions into agent expressions.  */
 
-/* Given a GDB expression EXPR, translate it into the agent bytecode,
-   and return it.  FLAGS are from enum expr_to_agent_flags.  */
-extern struct agent_expr *expr_to_agent (struct expression *EXPR,
-                                        struct axs_value *VALUE);
-
 /* Given a GDB expression EXPR denoting an lvalue in memory, produce a
    string of agent bytecode which will leave its address and size on
    the top of stack.  Return the agent expression.  */