DWARF Standard


HOME
SPECIFICATIONS
FAQ
ISSUES



170527.1 Jan Kratochvil DW_IDX_* for static/extern symbols Enhancement Accepted Cary Coutant


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.)

Proposed Change:

In table 6.1 on page 147, add the following:

  DW_IDX_external     Whether DW_AT_external is present on the
declaration (flag)

In Section 6.1.1.4.8 (Entry Pool), add the following:

Each index entry has a flag indicating whether the corresponding DIE
has the DW_AT_external attribute with a true value. If the
DW_IDX_external attribute is missing from an entry, it means that
DW_AT_external is false for that DIE.

In Table 7.23 on page 234, add the following:

  DW_IDX_external    6    flag

In Section 7.19 (Name Index Table), below Table 7.23, add the
following non-normative text:

It is suggested that producers should use the form code
DW_FORM_flag_present for the DW_IDX_external attribute for
abbreviation codes that represent external names.

--
2021-03-25: Revised.  Previous version: http://dwarfstd.org/issues/170527.1-1.html
2021-04-19: Accepted.


All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2007-2022 by DWARF Standards Committee.