From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18248 invoked by alias); 16 Feb 2002 00:38:45 -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 18148 invoked from network); 16 Feb 2002 00:38:43 -0000 Received: from unknown (HELO duracef.shout.net) (204.253.184.12) by sources.redhat.com with SMTP; 16 Feb 2002 00:38:43 -0000 Received: (from mec@localhost) by duracef.shout.net (8.11.6/8.11.6) id g1G0cbd03065; Fri, 15 Feb 2002 18:38:37 -0600 Date: Fri, 15 Feb 2002 16:38:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200202160038.g1G0cbd03065@duracef.shout.net> To: drow@mvista.com, gdb-patches@sources.redhat.com Subject: Re: [RFA] Select a particular mangling of a demangled symbol in lookup_block_symbol X-SW-Source: 2002-02/txt/msg00439.txt.bz2 Hi Daniel, > What we really SHOULD do is set it on both constructors silently, without > even acknowledging that they are different functions, or else offer the user > the choice. My preference is actually for the former. There's more grossness than that. Suppose that the constructor calls another function foo(). Suppose the user sets a breakpoint on foo() and looks at the stack and sees the constructor. Suppose the user looks at the assembly code for the constructor. Suppose the user continues, and takes the breakpoint on foo() again, and disassembles the constructor again, and sees different assembly code for the constructor. Games like that impair the user's trust in gdb. They start with a lie, And they lead to endless scenarios where you have to fix things up in order to maintain the lie. I would prefer that the different blocks of object code with different mangled names have different demangled names as well, such as "Foo::Foo()" and "Foo::Foo$nic()". (I guess if the user actually names one of his member functions Foo$nic then we are screwed ... is there any possible name which is not legal C++ member name?) Michael C