Skip to content

Add debug representation of trait objects #1563

Open
@jdm

Description

@jdm

Updated descrption

Trait objects (~T and @T where T is a trait) are objects that hide their implementation and carry a virtual method dispatch table (i.e. vtable).

So, two things:

  1. Debuggers will want to be able to bypass the abstraction barrier and see the hidden implementation.
  2. They are also likely to want to be able to see the vtable.
    • I am not sure how flexible the debug format is for gdb, but newer versions of gdb do support printing the vtable for C++ objects (via info vtbl or perhaps info vtable). It would be cool if we could massage our debug info so that gdb can just print out our vtables too, the same way.

Original description

There is none.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)A-dyn-traitArea: trait objects, vtable layoutC-feature-requestCategory: A feature request, i.e: not implemented / a PR.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions