From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5368 invoked by alias); 2 Mar 2011 19:41:09 -0000 Received: (qmail 5357 invoked by uid 22791); 2 Mar 2011 19:41:08 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Mar 2011 19:41:04 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id C205D390D1; Wed, 2 Mar 2011 11:41:01 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost4.vmware.com (Postfix) with ESMTP id B7170C9F82; Wed, 2 Mar 2011 11:41:01 -0800 (PST) Message-ID: <4D6E9D4D.1070108@vmware.com> Date: Wed, 02 Mar 2011 19:41:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: Pedro Alves CC: "gdb@sourceware.org" Subject: Re: question, xmalloc and gdbserver? References: <4D6D8067.9090802@vmware.com> <201103020940.21789.pedro@codesourcery.com> <4D6E8D00.5000304@vmware.com> <201103021844.53202.pedro@codesourcery.com> In-Reply-To: <201103021844.53202.pedro@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00027.txt.bz2 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; [...]