From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26604 invoked by alias); 16 Sep 2004 19:17:45 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 26582 invoked from network); 16 Sep 2004 19:17:39 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 16 Sep 2004 19:17:39 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i8GJHYPu003940 for ; Thu, 16 Sep 2004 15:17:39 -0400 Received: from zenia.home.redhat.com (sebastian-int.corp.redhat.com [172.16.52.221]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i8GJHXr22134; Thu, 16 Sep 2004 15:17:33 -0400 To: gdb@sources.redhat.com Subject: Re: breakpoints in C++ constructors References: <41474318.2090405@gnu.org> <16711.34668.469973.591378@gargle.gargle.HOWL> From: Jim Blandy Date: Thu, 16 Sep 2004 19:17:00 -0000 In-Reply-To: <16711.34668.469973.591378@gargle.gargle.HOWL> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-09/txt/msg00142.txt.bz2 There are some simpler problems whose solution would make supporting C++ constructors a bit easier. For example, what if we first tried to get this case working: foo.c: #include int f1 (int x) { #include } int f2 (int x) { #include } int main (int argc, char *argv) { printf ("%d\n", f2 (f1 (1))); } body.h: return x * 2; Setting a breakpoint at body.h:1 ought to result in breakpoint hits in f1 and f2. Making this work requires addressing: - symtab issues: decode_all_digits needs to return all the locations. etc. - user interface issues: How do we list breakpoints with multiple address? How do they appear in MI? - mechanism issues: we have to get breakpoint insertion and removal right. If the breakpoint is conditional, we need separate parsed versions of the condition for each location, since each location's expression is (potentially) being evaluated in a different block. etc. I think getting this working would make breakpoints by source location in constructors work: it's the same source location appearing in more than one physical function.