From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92688 invoked by alias); 13 Jan 2020 19:34:31 -0000 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 Received: (qmail 92680 invoked by uid 89); 13 Jan 2020 19:34:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Jan 2020 19:34:30 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 00DJYMSH010471 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Jan 2020 14:34:27 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 00DJYMSH010471 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1578944068; bh=S9ea9xEHoN3yuKOjH76frPd5qwcJSsHQqfUoxCOi6B0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=rnGveCxmCnjE5XOfGt7HqV+r4H9OXkKkILlJMH8G0FuVZGDlPFQYo38QrHIhdwQ3L Mw9GAIMw19fktRGrgJ1N/MEGu4NhA1ldMOBgfkOw2RJI39Vd1uEwGZj6AXmPh30B1y iSQsxpW5VnItZL6RxPa2MH+6A+nAuvlFu2hUcKSk= Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id CB2731E4C2; Mon, 13 Jan 2020 14:34:22 -0500 (EST) Subject: Re: [PATCH] gdb: use std::vector instead of alloca in core_target::get_core_register_section To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20200112201729.489317-1-simon.marchi@polymtl.ca> <87y2ubp8l0.fsf@tromey.com> From: Simon Marchi Message-ID: Date: Mon, 13 Jan 2020 19:36:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <87y2ubp8l0.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00347.txt.bz2 On 2020-01-13 12:30 p.m., Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> We are using alloca to hold the contents of a the core register > Simon> sections. These sections are typically fairly small, but there is no > Simon> realy guarantee, so I think it would be more reasonable to just use > Simon> dynamic allocation here. > > I would be fine with simply avoiding alloca in most, or all, cases. Agreed. > Simon> gdb/ChangeLog: > > Simon> * corelow.c (core_target::get_core_register_section): Use > Simon> std::vector instead of alloca. > > Looks reasonable to me. Ok, thanks all, I've pushed this patch. Simon