From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11085 invoked by alias); 5 May 2008 09:15:49 -0000 Received: (qmail 11076 invoked by uid 22791); 5 May 2008 09:15:49 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.29.156) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 05 May 2008 09:15:27 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.8/8.13.8) with ESMTP id m459FFsR173466 for ; Mon, 5 May 2008 09:15:15 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 m459FF554259986 for ; Mon, 5 May 2008 11:15:15 +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 m459FFBd023766 for ; Mon, 5 May 2008 11:15:15 +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 m459FDhZ023700 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 May 2008 11:15:15 +0200 Message-ID: <481ED021.9020207@de.ibm.com> Date: Mon, 05 May 2008 10:11:00 -0000 From: Markus Deuling User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: Vladimir Prus CC: gdb-patches@sources.redhat.com Subject: Re: [patch]: User choice for multiply-defined symbols References: <481EBD33.6090704@de.ibm.com> In-Reply-To: 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/msg00197.txt.bz2 Vladimir Prus schrieb: >> >> 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? > No, this was just to illustrate my example :-) Sorry if this was a confusing statement. The symbol lookup takes places in the symbol table. The following is an example from the combined debugger on Cell B./E. with some "SPU threads". I guess this was what I had in mind: (gdb) info sharedlibrary >From To Syms Read Shared Object Library 0x0ffc1980 0x0ffdb3d0 Yes /lib/ld.so.1 0x0fd5dd30 0x0fdbb4b0 Yes /lib/libm.so.6 0x0fd14560 0x0fd225c0 Yes /usr/lib/libspe2.so.2 0x0fe4d940 0x0ff6e3b0 Yes /lib/libc.so.6 0xf7f943e0 0xf7fa3350 Yes /lib/libpthread.so.0 0x0fa51820 0x0fa56d30 Yes /lib/librt.so.1 0x0f542170 0x0f551e70 Yes /lib/libgcc_s.so.1 0x00000030 0x00000960 Yes break_spu_bin@0x10001f80 <5> 0x00000030 0x00000960 Yes break_spu_bin@0x10001f80 <6> 0x00000030 0x00000960 Yes break_spu_bin@0x10001f80 <7> 0x00000030 0x00000960 Yes break_spu_bin@0x10001f80 <8> 0x00000030 0x00000960 Yes break_spu_bin@0x10001f80 <9> 0x00000030 0x00000960 Yes break_spu_bin@0x10001f80 <10> 0x00000030 0x00000960 Yes break_spu_bin@0x10001f80 <11> 0x00000030 0x00000960 Yes break_spu_bin@0x10001f80 <12> (gdb) br foo Breakpoint 9 at 0x10001800: file break.c, line 38. (gdb) br foo2 [0] cancel [1] all [2] foo2 at break.c:76 [3] foo2 at break_spu_bin.c:46 Please see the testcase attached with an exmaple with a "foo" in each module. Regards, Markus -- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com