+2016-11-09 Pedro Alves <palves@redhat.com>
+
+ * ax-gdb.c (agent_eval_command_one): Use std::move instead of
+ gdb::move.
+ * ax.h (agent_expr_up): Use std::unique_ptr instead of
+ gdb::unique_ptr.
+ * breakpoint.c (parse_cond_to_aexpr): Use std::move instead of
+ gdb::move.
+ * tracepoint.c (collection_list::collect_symbol): Likewise.
+ (collection_list::~collection_list): Delete.
+ (encode_actions_1): Use std::move instead of gdb::move.
+ (collection_list::add_aexpr): Use std::move instead of
+ unique_ptr::release.
+ * tracepoint.h (collection_list) <~collection_list>: Delete
+ declaration.
+ <m_aexprs>: Now a vector of agent_ptr_up.
+
2016-11-09 Pedro Alves <palves@redhat.com>
* main.c (struct cmdarg): Add constructor.
arg = exp;
if (!eval && strcmp (arg, "$_ret") == 0)
{
- agent = gdb::move (gen_trace_for_return_address (pc, get_current_arch (),
+ agent = std::move (gen_trace_for_return_address (pc, get_current_arch (),
trace_string));
}
else
if (eval)
{
gdb_assert (trace_string == 0);
- agent = gdb::move (gen_eval_for_expr (pc, expr.get ()));
+ agent = std::move (gen_eval_for_expr (pc, expr.get ()));
}
else
- agent = gdb::move (gen_trace_for_expr (pc, expr.get (), trace_string));
+ agent = std::move (gen_trace_for_expr (pc, expr.get (), trace_string));
}
ax_reqs (agent.get ());
};
/* An agent_expr owning pointer. */
-typedef gdb::unique_ptr<agent_expr> agent_expr_up;
+typedef std::unique_ptr<agent_expr> agent_expr_up;
/* The actual values of the various bytecode operations. */
that may show up. */
TRY
{
- aexpr = gdb::move (gen_eval_for_expr (scope, cond));
+ aexpr = std::move (gen_eval_for_expr (scope, cond));
}
CATCH (ex, RETURN_MASK_ERROR)
that may show up. */
TRY
{
- aexpr = gdb::move (gen_printf (scope, gdbarch, 0, 0,
+ aexpr = std::move (gen_printf (scope, gdbarch, 0, 0,
format_start, format_end - format_start,
fpieces, nargs, argvec));
}
}
}
- add_aexpr (gdb::move (aexpr));
+ add_aexpr (std::move (aexpr));
}
}
m_aexprs.reserve (128);
}
-collection_list::~collection_list ()
-{
- for (int ndx = 0; ndx < m_aexprs.size (); ndx++)
- delete m_aexprs[ndx];
-}
-
/* Reduce a collection list to string form (for gdb protocol). */
char **
}
}
- collect->add_aexpr (gdb::move (aexpr));
+ collect->add_aexpr (std::move (aexpr));
action_exp = strchr (action_exp, ','); /* more? */
}
else if (0 == strncasecmp ("$_sdata", action_exp, 7))
}
}
- collect->add_aexpr (gdb::move (aexpr));
+ collect->add_aexpr (std::move (aexpr));
collect->append_exp (exp.get ());
break;
} /* switch */
/* Even though we're not officially collecting, add
to the collect list anyway. */
- collect->add_aexpr (gdb::move (aexpr));
+ collect->add_aexpr (std::move (aexpr));
} /* do */
}
while (action_exp && *action_exp++ == ',');
void
collection_list::add_aexpr (agent_expr_up aexpr)
{
- m_aexprs.push_back (aexpr.release ());
+ m_aexprs.push_back (std::move (aexpr));
}
static void
{
public:
collection_list ();
- ~collection_list ();
void add_wholly_collected (const char *print_name);
std::vector<memrange> m_memranges;
- /* Vector owns pointers. */
- std::vector<agent_expr *> m_aexprs;
+ std::vector<agent_expr_up> m_aexprs;
/* True is the user requested a collection of "$_sdata", "static
tracepoint data". */