From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27780 invoked by alias); 2 Apr 2008 19:53:00 -0000 Received: (qmail 27772 invoked by uid 22791); 2 Apr 2008 19:53:00 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 02 Apr 2008 19:52:42 +0000 Received: from zps38.corp.google.com (zps38.corp.google.com [172.25.146.38]) by smtp-out.google.com with ESMTP id m32Jqadj001191 for ; Wed, 2 Apr 2008 20:52:36 +0100 Received: from yw-out-2324.google.com (ywh5.prod.google.com [10.192.8.5]) by zps38.corp.google.com with ESMTP id m32JqYaB008437 for ; Wed, 2 Apr 2008 12:52:35 -0700 Received: by yw-out-2324.google.com with SMTP id 5so414568ywh.29 for ; Wed, 02 Apr 2008 12:52:33 -0700 (PDT) Received: by 10.114.38.2 with SMTP id l2mr15580775wal.69.1207165953777; Wed, 02 Apr 2008 12:52:33 -0700 (PDT) Received: by 10.115.107.18 with HTTP; Wed, 2 Apr 2008 12:52:33 -0700 (PDT) Message-ID: Date: Wed, 02 Apr 2008 19:53:00 -0000 From: "Doug Evans" To: gdb Subject: info addr foo [where foo is a static global in multiple files] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00013.txt.bz2 If I want to find the addresses of all variables named foo, it seems like there should be an easy way to do this. "info addr foo" will only print one. There's also the issue that if I only want one it may not print the one I want. Should it print all of them? The user could study the output of "info var foo" and do things like "p/x &'file.c'::foo" for each variable, but that seems a bit clumsy (and doesn't work if the files all happen to have the same name). [As a workaround, the user could do "maint print symbols", but I wonder if "info addr" should change.]