/* Functions for manipulating expressions designed to be executed on the agent
- Copyright (C) 1998-2013 Free Software Foundation, Inc.
+ Copyright (C) 1998-2015 Free Software Foundation, Inc.
This file is part of GDB.
#include "ax.h"
#include "value.h"
-#include <string.h>
-
#include "user-regs.h"
static void grow_expr (struct agent_expr *x, int n);
struct agent_expr *
new_agent_expr (struct gdbarch *gdbarch, CORE_ADDR scope)
{
- struct agent_expr *x = xmalloc (sizeof (*x));
+ struct agent_expr *x = XNEW (struct agent_expr);
x->len = 0;
x->size = 1; /* Change this to a larger value once
for (i = 0; i < x->len;)
{
- enum agent_op op = x->buf[i];
+ enum agent_op op = (enum agent_op) x->buf[i];
if (op >= (sizeof (aop_map) / sizeof (aop_map[0]))
|| !aop_map[op].name)