Skip to content

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmWebAssembly architecturearea-Debugger-monoin-prThere is an active PR which will close this issue when it is merged

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions