Skip to content

DW_TAG_subprogram and multiple return values #16

@ggreif

Description

@ggreif

I think the return types are under-specified in the case that a WASM func returns more than one value (this is part of spec v1.1).

Let's assume we want to emit DWARF from wast2wasm:

  • when there are zero returns, omit the DW_AT_type
  • when one result emit DW_AT_type with that result type
  • when more than one result, ???.

One workaround that comes to my mind is emitting a synthetic tuple type, but maybe a proper solution should be worked out in cooperation with a future DWARF6 spec.

I am actually asking for ideas how to map multi-returns to DWARF5 and I am happy to provide input for discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions