From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14716 invoked by alias); 10 May 2012 14:50:42 -0000 Received: (qmail 14687 invoked by uid 22791); 10 May 2012 14:50:40 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_BJ X-Spam-Check-By: sourceware.org Received: from mail-gg0-f169.google.com (HELO mail-gg0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 May 2012 14:50:27 +0000 Received: by ggeq1 with SMTP id q1so1234152gge.0 for ; Thu, 10 May 2012 07:50:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.186.74 with SMTP id v50mr5838424yhm.1.1336661427235; Thu, 10 May 2012 07:50:27 -0700 (PDT) Received: by 10.236.200.202 with HTTP; Thu, 10 May 2012 07:50:27 -0700 (PDT) In-Reply-To: <87wr4kp0no.fsf@fleche.redhat.com> References: <1336430581-11262-1-git-send-email-brobecker@adacore.com> <4FABCD04.2070006@redhat.com> <87wr4kp0no.fsf@fleche.redhat.com> Date: Thu, 10 May 2012 14:50:00 -0000 Message-ID: Subject: Re: [RFC] choose symbol from given block's objfile first. From: Matt Rice To: Tom Tromey Cc: Pedro Alves , Joel Brobecker , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2012-05/txt/msg00345.txt.bz2 On Thu, May 10, 2012 at 7:32 AM, Tom Tromey wrote: >>>>>> "Pedro" =3D=3D Pedro Alves writes: > > Pedro> > Pedro> Still, this wouldn't solve the case of loading the same > Pedro> library twice... =A0Which symbol would you print? > Pedro> > > Yeah, we'd need additional syntax for that. > > One idea that came up on irc was to have 'info var' print the address of > variables. =A0That way you could always at least find the address of the > one you want. another idea (inspired by the handle returned by dlopen, argument to dlsym and friends), is something like (gdb) print libsomething.so@1::this_library_version (gdb) print libsomething.so@2::this_library_version and some associated command to get a list of libraries and their handle.