Skip to content
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

[mono][debugger] Improve debugger features #94066

Merged
merged 9 commits into from
Nov 22, 2023

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented Oct 26, 2023

  • Creating new messages
  • Fixing some messages or adding extra information.
  • Fixing when jit_end is called while running a invoke_method

@ghost
Copy link

ghost commented Oct 26, 2023

Tagging subscribers to this area: @thaystg
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Creating new messages
  • Fixing some messages or adding extra information.
  • Fixing when jit_end is called while running a invoke_method
Author: thaystg
Assignees: -
Labels:

area-Debugger-mono

Milestone: -

@thaystg thaystg requested a review from vargaz as a code owner October 27, 2023 13:47
Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

  1. A couple of places that look at MonoClassField:type need hot reload protection.
  2. It would be better if we didn't copy/paste the code from ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_GetSpanDataFrom
  3. The new MDBGPROT_CMD_APPDOMAIN_GET_TYPE command is kind of weird - I wonder if you can specialize it only for arrays (so it errors out if type is not MONO_TYPE_SZARRAY||MONO_TYPE_ARRAY). Or is this supposed to emulate some CoreCLR behavior (in that case, please add a comment that it has to do it in this weird way)

src/mono/mono/component/debugger-agent.c Outdated Show resolved Hide resolved
src/mono/mono/component/debugger-agent.c Show resolved Hide resolved
src/mono/mono/component/debugger-agent.c Show resolved Hide resolved
src/mono/mono/component/debugger-agent.c Outdated Show resolved Hide resolved
Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, except one error case that should return an error code.
also I think "get type" is not a good name for a command that creates an array type (but it's ok if you want to leave it)

@@ -7940,6 +7950,42 @@ domain_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
buffer_add_objid (buf, o);
break;
}
case MDBGPROT_CMD_APPDOMAIN_GET_TYPE: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it it only works on arrays? why is it called "get type" and not something like "create array type"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works also for pointers, but I'm not sure how to implement it yet, that is why I didn't implement.

src/mono/mono/component/debugger-agent.c Outdated Show resolved Hide resolved
@thaystg thaystg merged commit 3b4f846 into dotnet:main Nov 22, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants