From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20179 invoked by alias); 13 Jan 2002 19:08:44 -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 20133 invoked from network); 13 Jan 2002 19:08:44 -0000 Received: from unknown (HELO localhost.cygnus.com) (24.114.42.213) by sources.redhat.com with SMTP; 13 Jan 2002 19:08:44 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id 0DE8D3CFC; Sun, 13 Jan 2002 14:08:34 -0500 (EST) Message-ID: <3C41DB31.5000308@cygnus.com> Date: Sun, 13 Jan 2002 11:08: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 , Richard.Earnshaw@arm.com Cc: 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> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-01/txt/msg00350.txt.bz2 > + 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(). > I'll A.R.I. SIZEOF_FRAME_SAVED_REGS. I'll put a watch on it. Many of the uses shouldn't be there. Andrew