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: [patch] Avoid computing fullname if unused.


On Mon, Nov 7, 2011 at 6:48 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Doug" == Doug Evans <dje@google.com> writes:
>
> Doug> 2011-11-06 ?Doug Evans ?<dje@google.com>
> Doug> ? * dwarf2read.c (dw2_map_symbol_filenames): New parameter
> Doug> ? `need_fullname'.
> Doug> ? * psymtab.c (map_symbol_filenames_psymtab): Ditto.
> Doug> ? (map_partial_symbol_filenames): Ditto. ?All callers updated.
> Doug> ? * psymtab.h (map_partial_symbol_filenames): Update prototype.
> Doug> ? * symfile.h (struct quick_symbol_functions, map_symbol_filenames): New
> Doug> ? parameter need_fullname.
>
> Seems reasonable to me.
>
> Ideally these could be computed lazily, but that is a bit of a pain in C.
>
> Doug> + ?map_partial_symbol_filenames (print_partial_file_name, NULL,
> Doug> + ? ? ? ? ? ? ? ? ? ? ? ? TRUE /*need_fullname*/);
>
> I don't think TRUE and FALSE are really part of the gdb style.
> gdb tends to just use 0/1 for this.
> I'd like us to follow gcc and use 'bool', 'true', and 'false' -- but not
> these all-caps spellings.

TRUE,FALSE are already used in places and my thinking was it's easy to
do a mass search-n-replace when the time comes.
[Easier than 0,1. :-)]
But I went with 0,1 - they are more prevalent.

Committed.

2011-11-10  Doug Evans  <dje@google.com>

        * dwarf2read.c (dw2_map_symbol_filenames): New parameter
        `need_fullname'.
        * psymtab.c (map_symbol_filenames_psymtab): Ditto.
        (map_partial_symbol_filenames): Ditto.  All callers updated.
        * psymtab.h (map_partial_symbol_filenames): Update prototype.
        * symfile.h (struct quick_symbol_functions, map_symbol_filenames): New
        parameter need_fullname.

Attachment: gdb-111110-need-fullname-2.patch.txt
Description: Text document


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