-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wasm] [debugger] Support method calls #55458
[wasm] [debugger] Support method calls #55458
Conversation
Tagging subscribers to this area: @thaystg Issue DetailsSupport method calls:
|
Support object.
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsSupport method calls:
|
Few test cases could be added.
|
Negative test cases
|
|
@pavelsavara I added all the tests that makes sense for this PR. Thanks for the review!!! |
AssertEqual("Object reference not set to an instance of an object.", res.Error["message"]?.Value<string>(), "wrong error message"); | ||
|
||
(_, res) = await EvaluateOnCallFrame(id, "this.ParmToTestObjException.MyMethod()", expect_ok: false ); | ||
AssertEqual("Object reference not set to an instance of an object.", res.Error["message"]?.Value<string>(), "wrong error message"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should that really be NRE ? I would rather want to know what was the exception message
@@ -612,6 +696,18 @@ internal async Task<MonoBinaryReader> SendDebuggerAgentCommandWithParmsInternal( | |||
return ret_debugger_cmd_reader; | |||
} | |||
|
|||
public async Task<int> CreateString(SessionId sessionId, string value, CancellationToken token) | |||
{ | |||
var command_params = new MemoryStream(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using
keyword and camelCase in this C# method.
src/mono/wasm/debugger/BrowserDebugProxy/MemberReferenceResolver.cs
Outdated
Show resolved
Hide resolved
if (rootObject != null) | ||
{ | ||
DotnetObjectId.TryParse(rootObject?["objectId"]?.Value<string>(), out DotnetObjectId objectId); | ||
var typeId = await proxy.sdbHelper.GetTypeIdFromObject(sessionId, int.Parse(objectId.Value), true, token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
proxy.sdbHelper could be local variable sdbHelper here for readability. Also I wonder if that's private field since it has lowercase name.
var typeName = await proxy.sdbHelper.GetTypeName(sessionId, typeId[0], token); | ||
throw new Exception($"Method '{methodName}' not found in type '{typeName}'"); | ||
} | ||
var command_params_obj = new MemoryStream(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using
pattern
src/mono/wasm/debugger/BrowserDebugProxy/MemberReferenceResolver.cs
Outdated
Show resolved
Hide resolved
…debugger_custom_views * 'main' of github.com:thaystg/runtime: (125 commits) [wasm] [debugger] Support method calls (dotnet#55458) [debugger] Fix debugging after hot reloading (dotnet#55599) Inliner: Extend IL limit for profiled call-sites, allow inlining for switches. (dotnet#55478) DiagnosticSourceEventSource supports base class properties (dotnet#55613) [mono] Fix race during mono_image_storage_open (dotnet#55201) [mono] Add wrapper info for native func wrappers. (dotnet#55602) H/3 and Quic AppContext switch (dotnet#55332) Compression.ZipFile support for Unix Permissions (dotnet#55531) [mono] Fix skipping of static methods during IMT table construction. (dotnet#55610) Combine System.Private.Xml TrimmingTests projects (dotnet#55606) fix name conflict with Configuration class (dotnet#55597) Finish migrating RSAOpenSsl from RSA* to EVP_PKEY* Disable generic math (dotnet#55540) Obsolete CryptoConfig.EncodeOID (dotnet#55592) Address System.Net.Http.WinHttpHandler's nullable warnings targeting .NETCoreApp (dotnet#54995) Enable Http2_MultipleConnectionsEnabled_ConnectionLimitNotReached_ConcurrentRequestsSuccessfullyHandled (dotnet#55572) Fix Task.WhenAny failure mode when passed ICollection of zero tasks (dotnet#55580) Consume DistributedContextPropagator in DiagnosticsHandler (dotnet#55392) Add property ordering feature (dotnet#55586) Reduce subtest count in Reflection (dotnet#55537) ...
Support method calls: