From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37528 invoked by alias); 21 Apr 2018 22:52:46 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 37518 invoked by uid 89); 21 Apr 2018 22:52:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=vas, Hx-languages-length:1050, dias 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; Sat, 21 Apr 2018 22:52:44 +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 w3LMqc2H003550 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 21 Apr 2018 18:52:43 -0400 Received: by simark.ca (Postfix, from userid 112) id 58DDC1EF60; Sat, 21 Apr 2018 18:52:38 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 8F4881E17E; Sat, 21 Apr 2018 18:52:36 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 23 Apr 2018 00:59:00 -0000 From: Simon Marchi To: Jason Vas Dias Cc: gdb@sourceware.org Subject: Re: 'b ::new' causes gdb 8.1 to coredump ? In-Reply-To: References: <4lk4tj1i.fsf@gmail.com> Message-ID: <744f8b73dc6a36943fb21322c61849f1@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.4 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Sat, 21 Apr 2018 22:52:38 +0000 X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00014.txt.bz2 On 2018-04-21 16:57, Jason Vas Dias wrote: > Aha! It was the '::' namespace colons! > > (gdb) b "operator new(std::size_t)" > Breakpoint 2 at 0x155554c30680: file > ../../../../gcc-gcc-7-branch/libstdc++-v3/libsupc++/new_op.cc, line > 43. > (gdb) q > > > But I don't think the presence or absence of leading global namespace > '::' colons should cause GDB to coredump or fail to resolve operator > new() . > > Doesn't GDB understand C++ namespaces ? GDB does understand namespaces, just try "b std::string::find" for example. Maybe it's my knowledge of C++ that is lacking, but I don't think 'operator ::new' is right. It would be like writing 'operator ::+'. So (gdb) b 'operator new' sounds right to me. This: (gdb) b '::operator new' should probably work too (not sure), since you could have other operators in namespaces (foo::operator==(hello&, hello&)), but it also hits the assert. In any case, no input should ever hit an assert, so it's still a bug (it should be cleanly rejected). Simon