From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id A41AE3836E77 for ; Thu, 2 Jun 2022 14:34:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A41AE3836E77 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 252EMJlc006326; Thu, 2 Jun 2022 14:33:57 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gevdkkmx5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 Jun 2022 14:33:56 +0000 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 252EQ6tr020252; Thu, 2 Jun 2022 14:33:56 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gevdkkmwn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 Jun 2022 14:33:56 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 252ELEIp015402; Thu, 2 Jun 2022 14:33:54 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma02fra.de.ibm.com with ESMTP id 3gbcc6df79-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 Jun 2022 14:33:54 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 252EXlET21627354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 Jun 2022 14:33:47 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 338D652057; Thu, 2 Jun 2022 14:33:52 +0000 (GMT) Received: from [9.171.42.87] (unknown [9.171.42.87]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 559BB5204E; Thu, 2 Jun 2022 14:33:51 +0000 (GMT) Message-ID: Subject: Re: [PATCH 1/5] gdbsupport: Introduce obstack_newvec From: Ilya Leoshkevich To: Tom Tromey Cc: Andrew Burgess , Pedro Alves , Andreas Arnez , gdb-patches@sourceware.org Date: Thu, 02 Jun 2022 16:33:50 +0200 In-Reply-To: <87czfr3znl.fsf@tromey.com> References: <20220602133546.2948282-1-iii@linux.ibm.com> <20220602133546.2948282-2-iii@linux.ibm.com> <87czfr3znl.fsf@tromey.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: e37PX2DyK7PR3ZAZ_9dydRp3Qk_6Y6zZ X-Proofpoint-GUID: LHSfSK3hXEesPPh06jolok-9iqQGDq48 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-02_03,2022-06-02_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 spamscore=0 mlxlogscore=698 impostorscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 mlxscore=0 phishscore=0 clxscore=1015 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206020063 X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2022 14:34:01 -0000 On Thu, 2022-06-02 at 08:31 -0600, Tom Tromey wrote: > > > > > > "Ilya" == Ilya Leoshkevich writes: > > Ilya> obstack_calloc() allocates multiple objects, but doesn't call > their > Ilya> constructors.  obstack_new() allocates a single object and > calls its > Ilya> constructor.  Introduce a new function that does both. > > Is there some reason you want to keep these objects on the obstack at > all?  There's no requirement to do that in gdb, and it's probably > simpler to just use ordinary C++ allocation instead. > > Tom Not really, the only reason is that it used to be this way. I can use new[]/delete[] instead - this will simplify things.