This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Symbol file scope?


Hi,

On Tue, May 31, 2011 at 12:08 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Andrei" == Andrei Warkentin <andreiw@motorola.com> 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.
>

Thanks for the feedback. Will start cleaning up the patch into
something that can be submitted.

A


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]