This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
ping^2: [gcc patch] DWARF-5: Define DW_IDX_GNU_static and DW_IDX_GNU_external
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 2 Jul 2017 09:25:43 +0200
- Subject: ping^2: [gcc patch] DWARF-5: Define DW_IDX_GNU_static and DW_IDX_GNU_external
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jan dot kratochvil at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EFA19C0587D3
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EFA19C0587D3
- References: <20170526181408.GA15337@host1.jankratochvil.net> <20170623085813.GA19725@host1.jankratochvil.net>
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