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

Robinson, Paul paul.robinson@sony.com
Tue Jun 13 22:13:40 GMT 2017



> -----Original Message-----
> From: Dwarf-Discuss [mailto:dwarf-discuss-bounces at lists.dwarfstd.org] On
> Behalf Of Jan Kratochvil
> Sent: Tuesday, June 13, 2017 2:23 PM
> To: dwarf-discuss at lists.dwarfstd.org
> Subject: [Dwarf-Discuss] .debug_names: Preallocation of DW_IDX_* for
> static/extern symbols
> 
> 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?

There's no guarantee that your proposal would be accepted unmodified.
You should use the lo_user..hi_user range for anything you do now.
--paulr

> 
> 
> Thanks,
> Jan Kratochvil
> _______________________________________________
> Dwarf-Discuss mailing list
> Dwarf-Discuss at lists.dwarfstd.org
> http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org



More information about the Dwarf-discuss mailing list