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] Move networking code to debugger component #82785

Merged
merged 3 commits into from
Mar 2, 2023

Conversation

akoeplinger
Copy link
Member

The debugger is the only component left in Mono using the networking code, move the code there so we can avoid compiling it into the main runtime and also simplify it a bit.

The debugger is the only component left in Mono using the networking code, move the code there so we can avoid compiling it into the main runtime and also simplify it a bit.
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Feb 28, 2023

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

Issue Details

The debugger is the only component left in Mono using the networking code, move the code there so we can avoid compiling it into the main runtime and also simplify it a bit.

Author: akoeplinger
Assignees: akoeplinger
Labels:

area-Debugger-mono

Milestone: -

freeaddrinfo (info);
return 0;

#elif defined (HAVE_GETHOSTBYNAME) || defined (HAVE_GETHOSTBYNAME2) /* fallback networking code that relies on old BSD apis or whatever else is available */
Copy link
Member Author

Choose a reason for hiding this comment

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

I wonder whether there still is any platform we care about that doesn't have getaddrinfo?
We could drop this code otherwise.

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

thaystg commented Mar 1, 2023

@akoeplinger It's okay to remove/add #ifdef this #error "No networking implementation available" on wasi runtime, we don't use these functions for wasi debugger.
Here is what is used:

int sock_accept(int fd, int fdflags, int* result_ptr);

int ret_accept = sock_accept (socket_fd_long, __WASI_FDFLAGS_NONBLOCK, &conn_fd);

@akoeplinger
Copy link
Member Author

Ok, I assume we don't use the whole debugger-component on browser/wasi right? I'll replace the #error with a runtime g_error() instead.

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.

3 participants