From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5923 invoked by alias); 28 Mar 2008 00:05:21 -0000 Received: (qmail 5913 invoked by uid 22791); 28 Mar 2008 00:05:21 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 28 Mar 2008 00:05:03 +0000 Received: from zps36.corp.google.com (zps36.corp.google.com [172.25.146.36]) by smtp-out.google.com with ESMTP id m2S04xx8001971 for ; Fri, 28 Mar 2008 00:04:59 GMT Received: from wa-out-1112.google.com (wafl24.prod.google.com [10.114.188.24]) by zps36.corp.google.com with ESMTP id m2S04wMG009906 for ; Thu, 27 Mar 2008 17:04:58 -0700 Received: by wa-out-1112.google.com with SMTP id l24so7140754waf.22 for ; Thu, 27 Mar 2008 17:04:58 -0700 (PDT) Received: by 10.114.38.2 with SMTP id l2mr2743962wal.69.1206662697802; Thu, 27 Mar 2008 17:04:57 -0700 (PDT) Received: by 10.115.107.18 with HTTP; Thu, 27 Mar 2008 17:04:57 -0700 (PDT) Message-ID: Date: Fri, 28 Mar 2008 15:41:00 -0000 From: "Doug Evans" To: gdb Subject: constructor breakpoints MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes 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 X-SW-Source: 2008-03/txt/msg00270.txt.bz2 Having recently tripped over this (not being able to set breakpoints on constructors), and having read as much of the sordid history of this as I can find, I wonder what the current thinking is on how to fix this. Has there been any progress? bash$ ./gdb -nx testsuite/gdb.cp/overload (gdb) b foo::foo [0] cancel [1] all ?HERE ?HERE ?HERE > The ?HERE's are because symbol lookup finds the class, not the constructor. Being able to specifically ask for the constructor seems like a reasonable way to go. This could be done by encoding the request in the name (looking up c::c), or specifying the class of object to lookup (e.g. LOC_BLOCK), or rearranging the symbol table such that one can lookup the class, and then from that lookup (or iterate) over members that match certain parameters. [I'm just throwing out a range of possibilities.]