[Dwarf-Discuss] .debug_names: Preallocation of DW_IDX_* for static/extern symbols

Jan Kratochvil jan.kratochvil@redhat.com
Tue Jun 13 21:22:44 GMT 2017


Hello,

filed:
	http://dwarfstd.org/ShowIssue.php?issue=170527.1

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:
	https://sourceware.org/bugzilla/show_bug.cgi?id=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

Is it OK to start using these numbers to be in DWARF-6 or should stay in the
DW_IDX_lo_user..DW_IDX_hi_user range?


Thanks,
Jan Kratochvil



More information about the Dwarf-discuss mailing list