2002-12-13 Jeff Johnston <jjohnstn@redhat.com>
[deliverable/binutils-gdb.git] / gdb / ax-general.c
index 91aefff544287ba0a6386551dc5118315591d879..c36c76ddf105c7115973bbcb2f389a4d4fa0302a 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions for manipulating expressions designed to be executed on the agent
-   Copyright 1998, 2000 Free Software Foundation, Inc.
+   Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,6 +27,7 @@
 #include "ax.h"
 
 #include "value.h"
+#include "gdb_string.h"
 
 static void grow_expr (struct agent_expr *x, int n);
 
@@ -56,8 +57,8 @@ new_agent_expr (CORE_ADDR scope)
 void
 free_agent_expr (struct agent_expr *x)
 {
-  free (x->buf);
-  free (x);
+  xfree (x->buf);
+  xfree (x);
 }
 
 static void
@@ -416,7 +417,7 @@ ax_reqs (struct agent_expr *ax, struct agent_reqs *reqs)
       if (ax->buf[i] > (sizeof (aop_map) / sizeof (aop_map[0])))
        {
          reqs->flaw = agent_flaw_bad_instruction;
-         free (reg_mask);
+         xfree (reg_mask);
          return;
        }
 
@@ -425,14 +426,14 @@ ax_reqs (struct agent_expr *ax, struct agent_reqs *reqs)
       if (!op->name)
        {
          reqs->flaw = agent_flaw_bad_instruction;
-         free (reg_mask);
+         xfree (reg_mask);
          return;
        }
 
       if (i + 1 + op->op_size > ax->len)
        {
          reqs->flaw = agent_flaw_incomplete_instruction;
-         free (reg_mask);
+         xfree (reg_mask);
          return;
        }
 
@@ -441,7 +442,7 @@ ax_reqs (struct agent_expr *ax, struct agent_reqs *reqs)
       if (targets[i] && (heights[i] != height))
        {
          reqs->flaw = agent_flaw_height_mismatch;
-         free (reg_mask);
+         xfree (reg_mask);
          return;
        }
 
@@ -468,7 +469,7 @@ ax_reqs (struct agent_expr *ax, struct agent_reqs *reqs)
          if (target < 0 || target >= ax->len)
            {
              reqs->flaw = agent_flaw_bad_jump;
-             free (reg_mask);
+             xfree (reg_mask);
              return;
            }
          /* Have we already found other jumps to the same location?  */
@@ -477,7 +478,7 @@ ax_reqs (struct agent_expr *ax, struct agent_reqs *reqs)
              if (heights[i] != height)
                {
                  reqs->flaw = agent_flaw_height_mismatch;
-                 free (reg_mask);
+                 xfree (reg_mask);
                  return;
                }
            }
@@ -496,7 +497,7 @@ ax_reqs (struct agent_expr *ax, struct agent_reqs *reqs)
          if (!targets[i + 3])
            {
              reqs->flaw = agent_flaw_hole;
-             free (reg_mask);
+             xfree (reg_mask);
              return;
            }
 
@@ -531,7 +532,7 @@ ax_reqs (struct agent_expr *ax, struct agent_reqs *reqs)
     if (targets[i] && !boundary[i])
       {
        reqs->flaw = agent_flaw_bad_jump;
-       free (reg_mask);
+       xfree (reg_mask);
        return;
       }
 
This page took 0.025817 seconds and 4 git commands to generate.