From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25475 invoked by alias); 5 May 2008 08:36:21 -0000 Received: (qmail 25461 invoked by uid 22791); 5 May 2008 08:36:20 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 05 May 2008 08:35:56 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JswAj-00015l-K1 for gdb-patches@sources.redhat.com; Mon, 05 May 2008 08:35:45 +0000 Received: from 78.158.192.230 ([78.158.192.230]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 May 2008 08:35:45 +0000 Received: from vladimir by 78.158.192.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 May 2008 08:35:45 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [patch]: User choice for multiply-defined symbols Date: Mon, 05 May 2008 09:06:00 -0000 Message-ID: References: <481EBD33.6090704@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.5 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/msg00194.txt.bz2 Markus Deuling wrote: > Hello, > > the following patch makes use of the new "multiple-symbols" command introduced by Joel. > > If there is more than one symbol associated with a name and the multiple-symbols flag is set > to "ask", the user is asked to choose which of the symbols to use: > > (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 >> 3 > Breakpoint 6 at 0x100004b0: file ../../../../src/gdb/testsuite/gdb.base/multiple_symbols.c, line > 14. > > I extended "search_symbols" by a distinct flag. If set the new function "distinct_search_syms" is > called before returning the search result. As the name says, this function removes duplicates from > the search result. > > For exmaple: > > If GDB debugs a threaded application with a symbol "foo" in every thread, there would be a user > choice like: > > [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_mod.c:5 > [4] foo at ../../../../src/gdb/testsuite/gdb.base/multiple_symbols_mod.c:5 I'm not sure -- are we searching for a symbol in each thread? That seems a little bit strange -- did I miss some recent development? - Volodya