Skip to content

[wasm][debugger] Evaluate methods with short arguments #93057

Description

@ilonatommy

We do not have a mechanism of detecting if literal is short, so both options from each case:

  • short and int
  • sbyte and byte
  • uint and ushort
    are falling into the non-short category in MonoSdbHelper.WriteNumbers. The simplest fix for it that comes to my mind is a mechanism of InvokeMethod retries every time we detect a numeric literal that is of type int/byte/uint. With multiple parameters that classify for retry, the number of retries grows exponentially which is not the best solution.

Uncomment

// ("test.SumDefaultNegativeAndRequiredParamShortInts(-1, -120)", TNumber(-121)),
// ("test.SumDefaultNegativeAndRequiredParamShortInts(-1)", TNumber(-124)), // default: -123
// ("test.GetDefaultNegativeShortInt(-123)", TNumber(-123)),

in EvaluateMethodWithDefaultParam test. Current behavior:
"No implementation of method 'GetDefaultNegativeShortInt' matching 'test.GetDefaultNegativeShortInt(-123)' found in type DebuggerTests.DefaultParamMethods.TestClass.",

Coreclr behavior for the short int tests scenarios:
image

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-wasmWebAssembly architecturearea-Debugger-monoenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions