From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2096 invoked by alias); 8 May 2008 04:23:32 -0000 Received: (qmail 2087 invoked by uid 22791); 8 May 2008 04:23:31 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate2.de.ibm.com (HELO mtagate2.de.ibm.com) (195.212.29.151) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 May 2008 04:23:10 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.13.8/8.13.8) with ESMTP id m484N1u0115476 for ; Thu, 8 May 2008 04:23:01 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m484N1Qj2338958 for ; Thu, 8 May 2008 06:23:01 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m484N0fM011825 for ; Thu, 8 May 2008 06:23:01 +0200 Received: from bbkeks.de.ibm.com (dyn-9-152-248-39.boeblingen.de.ibm.com [9.152.248.39]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m484MxPC011807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 May 2008 06:23:00 +0200 Message-ID: <48228023.3080503@de.ibm.com> Date: Thu, 08 May 2008 11:43:00 -0000 From: Markus Deuling User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: Daniel Jacobowitz , GDB Patches , Ulrich Weigand Subject: Re: [patch]: User choice for multiply-defined symbols References: <481EBD33.6090704@de.ibm.com> <20080505114545.GA22274@caradoc.them.org> <482130DF.5010703@de.ibm.com> <20080507121920.GA1734@caradoc.them.org> In-Reply-To: <20080507121920.GA1734@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00273.txt.bz2 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. -- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com