Skip to content

[wasm][debugger] Add support for ValueTypes in DebuggerProxyAttribute #68390

Closed

Description

@ilonatommy

Runtime does not support invoking .ctor on ValueType.

Reproduction: remove return null from GetValuesFromDebuggerProxyAttribute and uncomment //FIXME: Issue #68390


Run test: DebuggerTests.EvaluateOnCallFrameTests.EvaluateBrowsableRootHidden with Theory data: "EvaluateBrowsableStruct" to evaluate testPropertiesNone.list.

Behavior:
for properties Invoke of .ctor fails in the runtime. In this case we are sending a buffer with 7 fields:

240 0 0 0 0 0 0 0 0 1 17 0 0 0 0 0 9 0 0 0 7 18 0 0 0 21 29 0 0 0 22 14 0 0 0 8 240 29 2 0 0 0 1 0 0 0 2 17 1 0 0 0 0 3 0 0 0 1 8 0 0 0 0 17 0 0 0 0 0 4 0 0 0 2 8 0 0 0 100 2 0 0 0 1 18 0 0 0 23

First error is caused by runtime not supporting type == MONO_TYPE_SZARRAY inside of valueTypes. Adding this option to default case in decode_value_internal helps to get to the remaining errors.

For fields we are sending a buffer with 2 fields:

240 0 0 0 0 0 0 0 0 1 17 0 0 0 0 0 3 0 0 0 2 8 0 0 0 100 2 0 0 0 1

Invoke .ctor in fields returns an object of a collection type. While getting its members in GetTypeMemberValues we are calling InvokeMethod again, in GetNonAutomaticPropertyValues which results in another runtime exception.

Activity

  1. ghost added
    untriaged
    on Apr 22, 2022
  2. removed
    untriaged
    on Apr 26, 2022
  3. added this to the 7.0.0 milestone on Jul 5, 2022
  4. modified the milestones: 7.0.0, 8.0.0 on Aug 11, 2022
  5. ghost added
    untriaged
    on Aug 11, 2022
  6. removed
    untriaged
    on Aug 11, 2022
  7. ghost added
    in-pr
    on Nov 2, 2022
  8. self-assigned this
    on Nov 2, 2022
  9. ghost locked as resolved and limited conversation to collaborators on Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-Debugger-monoin-pr

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions