From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24045 invoked by alias); 16 Jul 2003 02:33:33 -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 24025 invoked from network); 16 Jul 2003 02:33:30 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 16 Jul 2003 02:33:30 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9138D2B7F; Tue, 15 Jul 2003 22:33:30 -0400 (EDT) Message-ID: <3F14B97A.8070001@redhat.com> Date: Wed, 16 Jul 2003 02:33:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Snyder Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Improvements for sh double register display References: <3F031E03.3040206@redhat.com> <16148.21516.843971.449438@localhost.redhat.com> <3F145C53.7060708@redhat.com> <3F1481C1.2010201@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-07/txt/msg00314.txt.bz2 > Andrew Cagney wrote: > > + char *raw_buffer; > > + double dbl; > > + int inv; > > > ! /* Allocate space for the float. */ > > ! raw_buffer = (char *) alloca (2 * REGISTER_RAW_SIZE (FP0_REGNUM)); > > Can you use something other than alloca here? Also, this will collide > in mid air with Corinna's revamp. Maybe you can revisit this after she > is done? Otherwise it's ok. > > > Something like: > > char raw_buffer[MAX_REGISTER_SIZE * 2]; > > will do the trick. > > > Wah -- didn't we just go to a bunch of trouble to get rid of those? > By "just", I suppose I mean a year or two ago... Well four years ago. When MAX_REGISTER_RAW_SIZE et.al. were switched to variables, the arrays were replaced with alloca. However, now that the codes been cleaned up a lot, it's become clear that a simple MAX_REGISTER_SIZE constant is sufficient for many tasks. http://sources.redhat.com/ml/gdb/2003-04/msg00014.html Andrew