From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5923 invoked by alias); 4 Dec 2001 17:43:22 -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 5784 invoked from network); 4 Dec 2001 17:43:20 -0000 Received: from unknown (HELO kiruna.synopsys.com) (204.176.20.18) by sources.redhat.com with SMTP; 4 Dec 2001 17:43:20 -0000 Received: from mother.synopsys.com (mother.synopsys.com [146.225.100.171]) by kiruna.synopsys.com (Postfix) with ESMTP id 2FDB0F497; Tue, 4 Dec 2001 09:42:14 -0800 (PST) Received: from atrus.synopsys.com (localhost [127.0.0.1]) by mother.synopsys.com (8.9.1/8.9.1) with ESMTP id JAA22567; Tue, 4 Dec 2001 09:42:00 -0800 (PST) From: Joe Buck Received: (from jbuck@localhost) by atrus.synopsys.com (8.9.3+Sun/8.9.1) id JAA27724; Tue, 4 Dec 2001 09:42:13 -0800 (PST) Message-Id: <200112041742.JAA27724@atrus.synopsys.com> Subject: Re: [RFA/stabs reader] Fix v3 duplicate constructors problem To: jimb@zwingli.cygnus.com (Jim Blandy) Date: Tue, 04 Dec 2001 09:43:00 -0000 Cc: jason@redhat.com (Jason Merrill), msnyder@cygnus.com (Michael Snyder), gdb-patches@sources.redhat.com, gcc@gcc.gnu.org In-Reply-To: from "Jim Blandy" at Dec 04, 2001 11:55:10 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00104.txt.bz2 > > > Jason Merrill writes: > > Constructors and destructors have traditionally had a special calling > > convention. Though I suppose that as of v3, we've gone to clones rather > > than extra hidden parameters, so it would be more feasible to allow users > > to call them directly from the debugger. In any case, it needs some sort > > of special handling. > > Wouldn't it be reasonable for GDB to support `new' expressions? Yes, if the gdb user can call placement new, s/he can call a constructor and place an object whereever desired. Something like (gdb) call new(ptr) SomeClass(1, "Hello")