This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: ping^2: [gcc patch] DWARF-5: Define DW_IDX_GNU_static and DW_IDX_GNU_external
- From: Jason Merrill <jason at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>, gdb-patches at sourceware dot org
- Date: Sun, 2 Jul 2017 12:22:45 -0400
- Subject: Re: ping^2: [gcc patch] DWARF-5: Define DW_IDX_GNU_static and DW_IDX_GNU_external
- Authentication-results: sourceware.org; auth=none
- References: <20170526181408.GA15337@host1.jankratochvil.net> <20170623085813.GA19725@host1.jankratochvil.net> <20170702072543.GA5822@host1.jankratochvil.net>
On Sun, Jul 2, 2017 at 3:25 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> http://dwarfstd.org/ShowIssue.php?issue=170527.1
>
> 170527.1 Jan Kratochvil DW_IDX_* for static/extern symbols Enhancement Open
>
> Section 6.1.1.4.7, pg 147
> When a debugger wants to print 'somename' it logically tries to find first 'somename' as an
> external symbol in all available libraries. Only if none such external symbol is found the
> debugger starts searching for a static 'somename' symbol in those libraries.
>
> This requires to know whether a symbol in .debug_names index has DW_AT_external or not.
> Otherwise a lot of needless CU expansions happen. This extension improves performance
> gain of the .debug_names index.
>
> (Discovered in an original fix by Doug Evans - GDB Bug 14125.)
>
> Proposing and asking for pre-allocation:
> DW_IDX_static = 6 = DW_FORM_flag_present = DIE's DW_AT_external is not present
> DW_IDX_external = 7 = DW_FORM_flag_present = DIE's DW_AT_external is present
I'd suggest "internal" rather than "static". Otherwise the patch looks good.
Jason