From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1432 invoked by alias); 13 Jan 2002 19:54:30 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 1374 invoked from network); 13 Jan 2002 19:54:19 -0000 Received: from unknown (HELO localhost.cygnus.com) (24.114.42.213) by sources.redhat.com with SMTP; 13 Jan 2002 19:54:19 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id 780433D20; Sun, 13 Jan 2002 14:54:04 -0500 (EST) Message-ID: <3C41E5DC.1080904@cygnus.com> Date: Sun, 13 Jan 2002 11:54:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.7) Gecko/20020103 X-Accept-Language: en-us MIME-Version: 1.0 To: Kevin Buettner Cc: Richard.Earnshaw@arm.com, gdb-patches@sources.redhat.com Subject: Re: [PATCH] ARM: Eliminate EXTRA_FRAME_INFO & FRAME_FIND_SAVED_REGS References: <200201131528.PAA21457@cam-mail2.cambridge.arm.com> <1020113172426.ZM25643@localhost.localdomain> <3C41D47F.1020302@cygnus.com> <3C41DB31.5000308@cygnus.com> <1020113194559.ZM26001@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-01/txt/msg00354.txt.bz2 > On Jan 13, 2:08pm, Andrew Cagney wrote: > >> Subject: Re: [PATCH] ARM: Eliminate EXTRA_FRAME_INFO & FRAME_FIND_SAVED_RE > >> > + caller_fi.saved_regs = (CORE_ADDR *) xcalloc (1, SIZEOF_FRAME_SAVED_REGS); >> > + old_chain = make_cleanup (xfree, caller_fi.saved_regs); >> > + caller_fi.extra_info = xcalloc (1, sizeof (struct frame_extra_info)); >> > + make_cleanup (xfree, caller_fi.extra_info); >> > >> > >> > That calloc() call caught my attention. >> > >> > Just call frame_saved_regs_zalloc() and frame_obstack_alloc(). Since all is on the frame obstack, worrying about cleanups is unnecessary. > >> >> Hmm, no, sorry. That code is up to something wierd so it can't put the >> stuff on the obstack. However, I would just use xmalloc(). > > > With an explicit memset following the allocation? (Otherwise, they're > not initialized.) Hmm (figures out what exactly that calloc() is doing). Yes, ok, doesn't matter either way. Andrew