[Dwarf-Discuss] debug_names - what should go in ?

2018-04-10 Thread Pavel Labath via Dwarf-Discuss
Hello dwarf-discuss, over the last couple of months, I have been implementing DWARF v5 debug_names generation support in llvm. Implementation is not yet fully finished, but I have reached a point where I can start testing the generated index for completeness. I wrote a tool (based on LLVM's DWARF

Re: [Dwarf-Discuss] debug_names - what should go in ?

2018-04-10 Thread David Blaikie via Dwarf-Discuss
I'd say any case where a consumer couldn't actually rely on the table to do name resolution would be a bug - or at least something that needs to be seriously considered/discussed/figured out how the name table can be used in those situations. On Tue, Apr 10, 2018 at 8:33 AM Pavel Labath via Dwarf-

Re: [Dwarf-Discuss] debug_names - what should go in ?

2018-04-10 Thread Pavel Labath via Dwarf-Discuss
On Tue, 10 Apr 2018 at 16:44, David Blaikie wrote: > I'd say any case where a consumer couldn't actually rely on the table to > do name resolution would be a bug - or at least something that needs to be > seriously considered/discussed/figured out how the name table can be used > in those situati

Re: [Dwarf-Discuss] debug_names - what should go in ?

2018-04-10 Thread Michael Eager via Dwarf-Discuss
On 04/10/2018 08:33 AM, Pavel Labath via Dwarf-Discuss wrote: I believe it makes sense to include both of these things in the index (including the implicitly-named imported declarations), however I would also like to stick to the specification as much as possible. I know the spec gives implemento

Re: [Dwarf-Discuss] debug_names - what should go in ?

2018-04-10 Thread David Blaikie via Dwarf-Discuss
Yep - sounds like it to me. I suppose, arguably, one could say that successful name lookups of things in the index can be fast, while lookups that fail, or find names not in the index may be slow - but that seems unacceptable to me (in many cases "slow" would be "prohibitively slow" especially the

Re: [Dwarf-Discuss] debug_names - what should go in ?

2018-04-10 Thread Paul Robinson via Dwarf-Discuss
The intent of the index is given pretty plainly in the non-normative text at the bottom of p.137; you should be able to look up any unqualified name in the index. If the normative text doesn't accomplish that, we have an opportunity to improve the spec. ☺ FWIW here's my take: Enumerations are

Re: [Dwarf-Discuss] debug_names - what should go in ?

2018-04-10 Thread Eric Christopher via Dwarf-Discuss
I have nothing to add to what Paul just said :) This is definitely the intent and what we should do. -eric On Tue, Apr 10, 2018 at 10:26 AM Paul Robinson via Dwarf-Discuss < dwarf-discuss@lists.dwarfstd.org> wrote: > The intent of the index is given pretty plainly in the non-normative text > at

Re: [Dwarf-Discuss] debug_names - what should go in ?

2018-04-10 Thread Jim Ingham via Dwarf-Discuss
This is certainly how lldb treats the Apple names and types indexes. If present, we don't do any indexing of DWARF, we just use the indexes, and of course any local context. Enums have been a long-standing problem with this approach, the Apple indices only mention the enum type, so you can't u

Re: [Dwarf-Discuss] debug_names - what should go in ?

2018-04-10 Thread David Blaikie via Dwarf-Discuss
That's good to know - thanks Jim! Pavel, for unnamed using directives/declarations - why would you need to add the name to the index, shouldn't it already be in the index (if the index contains unqualified names) from its original location/definition? On Tue, Apr 10, 2018 at 10:44 AM Jim Ingham v

Re: [Dwarf-Discuss] debug_names - what should go in ?

2018-04-10 Thread Jason Merrill via Dwarf-Discuss
On Tue, Apr 10, 2018 at 12:24 PM, Pavel Labath via Dwarf-Discuss wrote: > namespace namesp1 { int var; } > namespace namesp2 = namesp1; // DW_TAG_imported_declaration A namespace alias like this should certainly be represented. I'm not sure about other uses of DW_TAG_imported_declaration. Jason