if (!info->priv)
{
- info->priv = xmalloc (sizeof (*(info->priv)));
+ info->priv = XNEW (struct private_thread_info);
info->private_dtor = free_private_thread_info;
info->priv->core = -1;
info->priv->extra = 0;
static struct notif_event *
remote_notif_stop_alloc_reply (void)
{
- struct notif_event *r
- = (struct notif_event *) XNEW (struct stop_reply);
+ /* We cast to a pointer to the "base class". */
+ struct notif_event *r = (struct notif_event *) XNEW (struct stop_reply);
r->dtr = stop_reply_dtr;
target_pid_to_str (ptid));
}
- tinfo = xzalloc (sizeof (*tinfo));
+ tinfo = XCNEW (struct btrace_target_info);
tinfo->ptid = ptid;
/* If we fail to read the configuration, we lose some information, but the