From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 367 invoked by alias); 24 Dec 2009 18:51:02 -0000 Received: (qmail 359 invoked by uid 22791); 24 Dec 2009 18:51:01 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 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; Thu, 24 Dec 2009 18:50:57 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id F14D21D02A; Thu, 24 Dec 2009 10:50:55 -0800 (PST) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost2.vmware.com (Postfix) with ESMTP id DB2748E579; Thu, 24 Dec 2009 10:50:55 -0800 (PST) Message-ID: <4B33B73D.5090709@vmware.com> Date: Thu, 24 Dec 2009 18:51:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20090624) MIME-Version: 1.0 To: Joel Brobecker CC: "gdb-patches@sourceware.org" Subject: Re: [ob] fix buf size in amd64_epilogue_frame_cache References: <4B2E762E.7060302@vmware.com> <20091221043809.GM2788@adacore.com> In-Reply-To: <20091221043809.GM2788@adacore.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-12/txt/msg00389.txt.bz2 Joel Brobecker wrote: >> 2009-12-20 Michael Snyder >> >> * amd64-tdep.c (amd64_epilogue_frame_cache): Fix buf size. > > I'm going to apply this patch to the gdb-7.0 branch as well. > >> - gdb_byte buf[4]; >> + gdb_byte buf[8]; > > I think we should try to avoid using litteral constants like these, > especially when we repeat that constant later. For instance, in > this case, we could have used register_size, or something similar... I don't think there's a simple "register_size" constant. There's a register_size function, but that's not a good way to declare an array size. There's MAX_REGISTER_SIZE, but that's 16. A possibility. If you've got a better suggestion...