From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13079 invoked by alias); 31 May 2011 17:09:14 -0000 Received: (qmail 13071 invoked by uid 22791); 31 May 2011 17:09:13 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 May 2011 17:08:32 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4VH8Upa016546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 31 May 2011 13:08:30 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p4VH8U2p014500; Tue, 31 May 2011 13:08:30 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p4VH8T38012952; Tue, 31 May 2011 13:08:29 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id B00C43780FB; Tue, 31 May 2011 11:08:28 -0600 (MDT) From: Tom Tromey To: Andrei Warkentin Cc: gdb-patches@sourceware.org Subject: Re: Symbol file scope? References: Date: Tue, 31 May 2011 17:09:00 -0000 In-Reply-To: (Andrei Warkentin's message of "Fri, 27 May 2011 18:14:06 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2011-05/txt/msg00698.txt.bz2 >>>>> "Andrei" == Andrei Warkentin writes: Andrei> It would be nice to be able to Andrei> have globals be searched for first in the object file to which the Andrei> current scope is in. Additionally, it would be nice to be able to Andrei> implement "module scope" in the same fashion as "file scope", so you Andrei> can look at globals in any module like this - Andrei> (gdb) print &'DxeCore.dll'::gST Andrei> $15 = (EFI_SYSTEM_TABLE **) 0x17fca6f0 Andrei> (gdb) print &'IsaBusDxe.dll'::gST Andrei> $16 = (EFI_SYSTEM_TABLE **) 0x17e21da4 This seems like a good feature. Andrei> 1) Modifies lookup_symbol_global to use Andrei> lookup_global_symbol_from_objfile before lookup_symbol_aux_symatbs or Andrei> solib_global_lookup Andrei> 2) Modifies lookup_symtab to match symbol object file as well. It Andrei> returns the first symtab, which is good enough for Andrei> lookup_symbol_global logic to work. (I basically wanted to avoid Andrei> modifying c-exp, p-exp, etc, parsers) I'd have to see it and hear more rationale for the placement. Offhand it seems reasonable. Andrei> 3) Fixes location completion to match object file names as well. Thanks. Andrei> 4) Adds a list-symbol-files command to list all objfiles and their Andrei> locations, or list only those that match objfile/source file names. Andrei> I.e - Andrei> gdb) list-symbol-files DiskIo.c Dispatcher.c EhciDxe.dll This should be an "info" subcommand instead. Andrei> I have a patch here - Andrei> https://github.com/andreiw/andreiw-wip/blob/master/gdb/0001-GDB-Initial-prototype-of-symbol-file-scope-module-sc.patch I glanced at it but didn't try to do any serious review. I'd suggest: rebase, write a ChangeLog entry, and submit here. You'll also have to update the docs and write some tests. If you don't have copyright assignment paperwork in place, please contact me off-list so we can get you started on that. It is best to start this early, because sometimes it takes a while. Tom