From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25047 invoked by alias); 8 May 2008 09:46:41 -0000 Received: (qmail 25038 invoked by uid 22791); 8 May 2008 09:46:41 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout5.012.net.il (HELO mtaout5.012.net.il) (84.95.2.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 May 2008 09:46:21 +0000 Received: from HOME-C4E4A596F7 ([83.130.255.47]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K0J00HD2NSBYGG1@i_mtaout5.012.net.il> for gdb-patches@sourceware.org; Thu, 08 May 2008 13:00:12 +0300 (IDT) Date: Thu, 08 May 2008 16:33:00 -0000 From: Eli Zaretskii Subject: Re: [patch]: User choice for multiply-defined symbols In-reply-to: <48228023.3080503@de.ibm.com> X-012-Sender: halo1@inter.net.il To: Markus Deuling Cc: drow@false.org, gdb-patches@sourceware.org, uweigand@de.ibm.com Reply-to: Eli Zaretskii Message-id: References: <481EBD33.6090704@de.ibm.com> <20080505114545.GA22274@caradoc.them.org> <482130DF.5010703@de.ibm.com> <20080507121920.GA1734@caradoc.them.org> <48228023.3080503@de.ibm.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00276.txt.bz2 > Date: Thu, 08 May 2008 06:22:59 +0200 > From: Markus Deuling > > Daniel Jacobowitz schrieb: > > GDB has done this for years and years. I guess these are just normal > > C symbols rather than C++ overloaded symbols, though, so that's the > > difference? > > > > I'm worried about all the different ways of dealing with lists of > > symbols. If we can already ask to set a breakpoint at foo(int) or > > foo(int, int) why does this code have to be in a separate place? > > > > It improves user experience. If there are symbols with the same name (it doesn't care about > the signature of a function) in different modules of your application you *can* now ask GDB to let you choose > which of them to take. Normal operation would be to return the first symbol found. > > Another advantage is, that the user is now able to choose one or more symbols from the list. For example: > > (gdb) break foo > [0] cancel > [1] all > [2] foo at ../../../../src/gdb/testsuite/gdb.base/multiple_symbols_mod.c:5 > [3] foo at ../../../../src/gdb/testsuite/gdb.base/multiple_symbols.c:14 > [4] foo at ../../../../src/gdb/testsuite/gdb.base/multiple_symbols_two.c:42 > [5] foo at ../../../../src/gdb/testsuite/gdb.base/multiple_symbols_three.c:23 > > The user can choose for example symbol 3 and 5 for setting a breakpoint. Like Daniel, I'm also confused. Could someone please post a complete list of GDB features related to setting breakpoints at several places whose names are similar/identical, with a short summary of when each one is useful? I think we should consider all these features at once, from the user perspective, and I don't see how can we reason about usability without having a complete picture. Thanks.