This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: question, xmalloc and gdbserver?
Pedro Alves wrote:
On Wednesday 02 March 2011 18:31:28, Michael Snyder wrote:
OK, so you're saying that all "legitimate" calls to malloc
will be checked?
Yes.
Well, here's the one I'm thinking of. It's not clear to me
what to do in case of error. What do you think?
/* Put a stop reply to the stop reply queue. */
static void
queue_stop_reply (ptid_t ptid, struct target_waitstatus *status)
{
struct vstop_notif *new_notif;
new_notif = malloc (sizeof (*new_notif));
new_notif->next = NULL;
new_notif->ptid = ptid;
new_notif->status = *status;
[...]