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

Pavel Labath labath@google.com
Tue Apr 10 16:24:14 GMT 2018


On Tue, 10 Apr 2018 at 16:44, David Blaikie <dblaikie at gmail.com> 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 situations.
>

Agreed.

This question can be demonstrated on a simple c++ program
============
namespace namesp1 { int var; }
namespace namesp2 = namesp1; // DW_TAG_imported_declaration

enum enum_type { enumerator }; // DW_TAG_enumeration_type, DW_TAG_enumerator

int main() {
  return namesp2::var + enumerator;
}
============

Debugging with gdb (without any indexes), the following 4 expressions
succeed
1) namesp1::var
2) namesp2::var
3) (enum_type)0
4) enumerator

The question is how should an index-aware debugger find the entities
referenced by expressions 2 and 4 if they are not present in the index?

They way I see it -- it can't. Which would be a bug in the spec by your
definition.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/attachments/20180410/ffc90261/attachment.html>



More information about the Dwarf-discuss mailing list