[testsuite] Unbuffer the output in gdb.base/multi-forks.c
[deliverable/binutils-gdb.git] / gdb / ax-general.c
index 49afee6c1b980a45566dc0a8df8cc67f0d7fd55c..30f90e897120d1d4a6c9818ddca8e2bd5046d342 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions for manipulating expressions designed to be executed on the agent
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -73,7 +73,7 @@ free_agent_expr (struct agent_expr *x)
 static void
 do_free_agent_expr_cleanup (void *x)
 {
-  free_agent_expr (x);
+  free_agent_expr ((struct agent_expr *) x);
 }
 
 struct cleanup *
@@ -133,13 +133,20 @@ read_const (struct agent_expr *x, int o, int n)
   return accum;
 }
 
+/* See ax.h.  */
+
+void
+ax_raw_byte (struct agent_expr *x, gdb_byte byte)
+{
+  grow_expr (x, 1);
+  x->buf[x->len++] = byte;
+}
 
 /* Append a simple operator OP to EXPR.  */
 void
 ax_simple (struct agent_expr *x, enum agent_op op)
 {
-  grow_expr (x, 1);
-  x->buf[x->len++] = op;
+  ax_raw_byte (x, op);
 }
 
 /* Append a pick operator to EXPR.  DEPTH is the stack item to pick,
This page took 0.023814 seconds and 4 git commands to generate.